Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/prefs.js

Issue 5732725684174848: Use safari.extension.settings instead of localStorage and WebSQL (Closed)
Patch Set: Created March 12, 2014, 2:11 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/filesystem/io.js ('k') | lib/storage/io.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/prefs.js
===================================================================
--- a/lib/prefs.js
+++ b/lib/prefs.js
@@ -50,11 +50,11 @@
{
if (value === null)
{
- if (key in localStorage)
+ if (key in ext.storage)
{
try
{
- value = JSON.parse(localStorage[key]);
+ value = JSON.parse(ext.storage[key]);
}
catch(e)
{
@@ -74,9 +74,9 @@
let stringified = JSON.stringify(newValue);
if (stringified != JSON.stringify(defaults[key]))
- localStorage[key] = stringified;
+ ext.storage[key] = stringified;
else
- delete localStorage[key];
+ delete ext.storage[key];
value = newValue;
« no previous file with comments | « lib/filesystem/io.js ('k') | lib/storage/io.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld