Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#2040 closed change (fixed)

Replace localStorage with chrome.storage

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

http://codereview.adblockplus.org/5693109165883392
http://codereview.adblockplus.org/5203041586249728

Description (last modified by sebastian)

Background

Currently Adblock Plus for Chrome uses localStorage to store preferences and its current version number.

With #2021 we are going to replace the FileSystem API with chrome.storage.local, and with #1488 we are going to implement chrome.storage.managed to allow some pre-configured preferences. So for consistency and to simplify the implementation, we should only use chrome.storage for persistent data.

What to change

Replace localStorage with chrome.storage.local, and migrate data for existing users.

Hint for testers

Make sure that preferences are preserved ...

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

Change History (8)

comment:1 Changed 5 years ago by sebastian

  • Description modified (diff)

comment:2 Changed 5 years ago by sebastian

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

comment:3 Changed 5 years ago by sebastian

  • Review URL(s) modified (diff)

comment:4 Changed 5 years ago by sebastian

  • Blocked By 2047 added

comment:5 Changed 5 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:6 Changed 5 years ago by Ross

The problem in comment 10 of #2021 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:7 Changed 4 years ago by Ross

  • Verified working set

Double checked along with #2567. Upgraded correctly from 1394 > 1423 > 1433.

ABP 1.8.12.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

Last edited 4 years ago by Ross (previous) (diff)

comment:8 Changed 4 years ago by Ross

Double checked 1394 > 1433 also as Sebastian mentioned this is the migration that will be performed by users on stable. Preferences/stats are migrated correctly.

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

Last edited 4 years ago by Ross (previous) (diff)
Note: See TracTickets for help on using tickets.