|
|
Created:
6 years, 3 months ago by Daniel Erat Modified:
6 years, 3 months ago CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Project:
chromium Visibility:
Public. |
DescriptionMake chrome.power sample extension work across updates.
Make the "Keep Awake" extension load its saved state in
response to chrome.runtime.onInstalled in addition to
onStartup. Otherwise, it releases its wake locks after being
upgraded and fails to reacquire them until the next time
Chrome is restarted.
BUG=none
TBR=miket@chromium.org
Committed: https://crrev.com/cf6503512cff8034833ddb07c69fa71717a29a03
Cr-Commit-Position: refs/heads/master@{#295805}
Patch Set 1 #
Total comments: 2
Messages
Total messages: 23 (8 generated)
derat@chromium.org changed reviewers: + mpcomplete@chromium.org
lgtm https://codereview.chromium.org/584033003/diff/1/chrome/common/extensions/doc... File chrome/common/extensions/docs/examples/api/power/background.js (right): https://codereview.chromium.org/584033003/diff/1/chrome/common/extensions/doc... chrome/common/extensions/docs/examples/api/power/background.js:100: loadSavedState(function(state) { setState(state); }); I assume loadSavedState can be called multiple times without a problem. I mention this because you might get an onInstalled event and onStartup event one after the other, e.g. when Chrome itself updates.
https://codereview.chromium.org/584033003/diff/1/chrome/common/extensions/doc... File chrome/common/extensions/docs/examples/api/power/background.js (right): https://codereview.chromium.org/584033003/diff/1/chrome/common/extensions/doc... chrome/common/extensions/docs/examples/api/power/background.js:100: loadSavedState(function(state) { setState(state); }); On 2014/09/19 19:47:27, Matt Perry wrote: > I assume loadSavedState can be called multiple times without a problem. I > mention this because you might get an onInstalled event and onStartup event one > after the other, e.g. when Chrome itself updates. yep, this should be fine. the locks don't stack and setState() blows away whatever was there already, so the second duplicated call should just be a no-op.
The CQ bit was checked by derat@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/584033003/1
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/584033003/1
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
derat@chromium.org changed reviewers: + miket@chromium.org
tbr miket
The CQ bit was checked by derat@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/584033003/1
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/584033003/1
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ni...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ni...)
The CQ bit was checked by derat@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/584033003/1
Message was sent while issue was closed.
Committed patchset #1 (id:1) as 0443b62ed7e2da245a77c21782373f11cd33d7a7
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/cf6503512cff8034833ddb07c69fa71717a29a03 Cr-Commit-Position: refs/heads/master@{#295805}
Message was sent while issue was closed.
lgtm |