Commit cf650351 authored by derat's avatar derat Committed by Commit bot

Make 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

Review URL: https://codereview.chromium.org/584033003

Cr-Commit-Position: refs/heads/master@{#295805}
parent a135a784
......@@ -95,3 +95,7 @@ chrome.browserAction.onClicked.addListener(function() {
chrome.runtime.onStartup.addListener(function() {
loadSavedState(function(state) { setState(state); });
});
chrome.runtime.onInstalled.addListener(function(details) {
loadSavedState(function(state) { setState(state); });
});
......@@ -3,7 +3,7 @@
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "1.8",
"version": "1.9",
"icons": {
"16": "images/icon-16.png",
"48": "images/icon-48.png",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment