Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Issue 13493019: Update chrome.power example extension. (Closed)

Created:
7 years, 8 months ago by Daniel Erat
Modified:
7 years, 8 months ago
Reviewers:
Matt Perry
CC:
chromium-reviews, Aaron Boodman, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

Update chrome.power example extension. This renames some "level" variables to "state" to make it more clear that they don't directly map to the API's "level" enum. It also registers chrome.runtime.onStartup and chrome.windows.onCreated (to work around onStartup apparently not firing on Chrome OS) listeners and switches from localStorage to chrome.storage.local. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=192992

Patch Set 1 #

Patch Set 2 : minor updates #

Patch Set 3 : s/loadSavedState/GetSavedState/ #

Patch Set 4 : add chrome.windows.onCreated listener #

Total comments: 1

Patch Set 5 : use chrome.storage.local instead of localStorage #

Patch Set 6 : update a comment #

Total comments: 3

Patch Set 7 : remove tabs permission and bump to 1.6 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -54 lines) Patch
M chrome/common/extensions/docs/examples/api/power/background.js View 1 2 3 4 5 4 chunks +54 lines, -52 lines 0 comments Download
M chrome/common/extensions/docs/examples/api/power/manifest.json View 1 2 3 4 5 6 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Daniel Erat
7 years, 8 months ago (2013-04-08 20:45:38 UTC) #1
Matt Perry
https://codereview.chromium.org/13493019/diff/6001/chrome/common/extensions/docs/examples/api/power/background.js File chrome/common/extensions/docs/examples/api/power/background.js (right): https://codereview.chromium.org/13493019/diff/6001/chrome/common/extensions/docs/examples/api/power/background.js#newcode30 chrome/common/extensions/docs/examples/api/power/background.js:30: if (STATE_KEY in localStorage) { We're trying to move ...
7 years, 8 months ago (2013-04-08 21:00:22 UTC) #2
Daniel Erat
Thanks, another look?
7 years, 8 months ago (2013-04-08 21:40:37 UTC) #3
Matt Perry
lgtm https://codereview.chromium.org/13493019/diff/14001/chrome/common/extensions/docs/examples/api/power/background.js File chrome/common/extensions/docs/examples/api/power/background.js (right): https://codereview.chromium.org/13493019/diff/14001/chrome/common/extensions/docs/examples/api/power/background.js#newcode79 chrome/common/extensions/docs/examples/api/power/background.js:79: chrome.storage.local.set(items); nit: could also do set({STATE_KEY: newState});
7 years, 8 months ago (2013-04-08 21:44:33 UTC) #4
Daniel Erat
https://codereview.chromium.org/13493019/diff/14001/chrome/common/extensions/docs/examples/api/power/background.js File chrome/common/extensions/docs/examples/api/power/background.js (right): https://codereview.chromium.org/13493019/diff/14001/chrome/common/extensions/docs/examples/api/power/background.js#newcode79 chrome/common/extensions/docs/examples/api/power/background.js:79: chrome.storage.local.set(items); On 2013/04/08 21:44:33, Matt Perry wrote: > nit: ...
7 years, 8 months ago (2013-04-08 21:50:18 UTC) #5
Matt Perry
https://codereview.chromium.org/13493019/diff/14001/chrome/common/extensions/docs/examples/api/power/background.js File chrome/common/extensions/docs/examples/api/power/background.js (right): https://codereview.chromium.org/13493019/diff/14001/chrome/common/extensions/docs/examples/api/power/background.js#newcode79 chrome/common/extensions/docs/examples/api/power/background.js:79: chrome.storage.local.set(items); On 2013/04/08 21:50:18, Daniel Erat wrote: > On ...
7 years, 8 months ago (2013-04-08 21:51:55 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/derat@chromium.org/13493019/14001
7 years, 8 months ago (2013-04-08 22:30:06 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/derat@chromium.org/13493019/28001
7 years, 8 months ago (2013-04-08 23:57:06 UTC) #8
commit-bot: I haz the power
7 years, 8 months ago (2013-04-09 03:12:09 UTC) #9
Message was sent while issue was closed.
Change committed as 192992

Powered by Google App Engine
This is Rietveld 408576698