Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#2021 closed change (fixed)

Replace FileSystem API with chrome.storage

Reported by: sebastian Assignee: sebastian
Priority: P3 Milestone: Adblock-Plus-1.9-for-Chrome-Opera-Safari
Module: Platform Keywords:
Cc: mapx, Ross Blocked By: #2040
Blocking: Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working: yes
Review URL(s):

http://codereview.adblockplus.org/5768064935133184
http://codereview.adblockplus.org/5957502386569216

Description (last modified by sebastian)

Background

Currently Adblock Plus for Chrome uses the FileSystem API to store filter lists. However, that API didn't make it into the standard and is only implemented in Blink. Hence it is just a matter of time until it will be phased out.

What to change

Replace the FileSystem API with chrome.storage.local, and migrate filters for existing users.

Hint for testers

Make sure that subscriptions and user filters are preserved ...

  • when updating from a version before this change.
  • across browser restart, further extension updates, and crashes.

Change History (14)

comment:1 Changed 5 years ago by sebastian

  • Description modified (diff)

comment:2 Changed 5 years ago by mapx

  • Cc mapx added
  • Description modified (diff)

comment:3 Changed 5 years ago by sebastian

  • Description modified (diff)

comment:4 Changed 5 years ago by sebastian

  • Description modified (diff)

comment:5 Changed 5 years ago by sebastian

  • Blocked By 2040 added

comment:6 Changed 5 years ago by sebastian

  • Description modified (diff)

comment:7 Changed 5 years ago by sebastian

  • Owner set to sebastian

comment:8 Changed 5 years ago by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:9 Changed 4 years ago by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next
  • Resolution set to fixed
  • Status changed from reviewing to closed
  • Verified working unset

comment:10 Changed 4 years ago by Ross

I tested this going from build 1.8.12.1394 to 1.8.12.1422.

  1. Installed 1394. Added a new subscription (German EasyList), disabled AA and added a string to the filter and white lists.
  2. Upgraded to 1422. Preferences were preserved (as expected).
  3. Restarted Chrome. Preferences still preserved (as expected).
  4. Added new entries to the whitelist / toggled AA / Added EasyList China and restarted Chrome.
  5. Preferences are now back in the state set in Step 1.

Chrome 42.0.2311.90 / Windows 8.1 x64 / ABP: 1.8.12.1394 / 1.8.12.1422

comment:11 Changed 4 years ago by sebastian

  • Cc Ross added
  • Review URL(s) modified (diff)

Reproduced. Calling removeRecursively() on the root directory fails. Hence, data originally stored with the FileSystem API are migrated again, every time the extension is loaded, overwriting changes.

comment:13 Changed 4 years ago by Ross

The problem in comment 10 is fixed. Preferences are preserved correctly from older builds, after browser restart and crashes (tested with "chrome://inducebrowsercrashforrealz"). Waiting until a later build than the recent fix (1423) is available to confirm the last point (further extension updates) then will set to verified working.

Chrome 42.0.2311.90 / Windows 8.1 x64 / ABP: 1.8.12.1394 / 1.8.12.1423
Opera 28.0.1750.51 / Windows 8.1 x64 / ABP: 1.8.12.1394 / 1.8.12.1423
Safari 6.2 / OS X 10.8.5 / ABP: 1.8.12.1394 / 1.8.12.1423

comment:14 Changed 4 years ago by Ross

  • Verified working set

Double checked along with #2567 and #2021. Migrated correctly from 1394 > 1423 > 1433 and also from 1394 > 1433.

Safari 6.2 / OS X 10.8.5
Opera 29.0.1795.60 / Windows 8.1 x64
Chrome 43.0.2357.81 / Windows 8.1 x64

Note: See TracTickets for help on using tickets.