[HTTPS-Everywhere] [GSoC] Progress Report

Jacob S Hoffman-Andrews jsha at eff.org
Thu Aug 14 14:39:17 PDT 2014


>
> There is still, however, the problem of updating the database file 
> used by the extension.  As I anticipated, trying to drop the 
> existing data with the following line of code:
>    mainDB.createStatement("drop table rulesets").execute();
I think you shouldn't be doing this at the SQL level, you should be 
doing it by dropping the new file into place, which it sounds like 
you are going to do next. Take a look at how user rulesets are 
implemented. The (immutable) extension files go under 
.mozilla/firefox/xjhfewkj.dev/extensions/https-everywhere at eff.org. 
But when the user creates new rules they go under 
.mozilla/firefox/xjhfewkj.dev/HTTPSEverywhereUserRules, which is 
modifiable.

Probably the best approach is this: Choose some directory under the 
profile root, say HTTPSEverywhereRulesetUpdates. At startup or when 
reloading rulesets, look for a rulesets.sqlite there. If not 
present, load the immutable copy from the extension directory. When 
an update is downloaded, store it in the profile root under 
HTTPSEverywhereRulesetUpdates. There are some extension APIs that 
should allow you to get the profile directory and the extension 
directory. I don't remember them offhand but the user rules example 
should show you the way.

Thanks for all your hard work on this!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.eff.org/pipermail/https-everywhere/attachments/20140814/730be1ee/attachment.html>


More information about the HTTPS-Everywhere mailing list