Opened on 02/25/2015 at 01:40:52 PM

Closed on 04/20/2015 at 03:26:14 PM

Last modified on 06/03/2015 at 01:57:03 PM

#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.

Attachments (0)

Change History (8)

comment:1 Changed on 02/25/2015 at 01:41:42 PM by sebastian

  • Description modified (diff)

comment:2 Changed on 02/26/2015 at 12:11:29 PM by sebastian

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

comment:3 Changed on 02/26/2015 at 12:12:42 PM by sebastian

  • Review URL(s) modified (diff)

comment:4 Changed on 02/26/2015 at 12:27:54 PM by sebastian

  • Blocked By 2047 added

comment:5 Changed on 04/20/2015 at 03:26:14 PM 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 on 04/22/2015 at 10:15:27 PM 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 on 06/03/2015 at 12:57:53 PM 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 on 06/03/2015 at 01:56:53 PM by Ross

comment:8 Changed on 06/03/2015 at 01:46:57 PM 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 on 06/03/2015 at 01:57:03 PM by Ross

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from sebastian.
 
Note: See TracTickets for help on using tickets.