| Index: chrome/test/data/extensions/subscribe_page_action/background.js
|
| ===================================================================
|
| --- chrome/test/data/extensions/subscribe_page_action/background.js (revision 190361)
|
| +++ chrome/test/data/extensions/subscribe_page_action/background.js (working copy)
|
| @@ -2,11 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -// A dictionary keyed off of tabId that keeps track of data per tab (for
|
| -// example what feedUrl was detected in the tab).
|
| -var feedData = {};
|
| -
|
| -chrome.extension.onRequest.addListener(function(request, sender) {
|
| +chrome.extension.onMessage.addListener(function(request, sender) {
|
| if (request.msg == "feedIcon") {
|
| // First validate that all the URLs have the right schema.
|
| var input = [];
|
| @@ -26,7 +22,7 @@
|
|
|
| // We have received a list of feed urls found on the page.
|
| // Enable the page action icon.
|
| - feedData[sender.tab.id] = input;
|
| + localStorage.setItem(sender.tab.id, JSON.stringify(input));
|
| chrome.pageAction.setTitle(
|
| { tabId: sender.tab.id,
|
| title: chrome.i18n.getMessage("rss_subscription_action_title")
|
| @@ -52,5 +48,5 @@
|
| });
|
|
|
| chrome.tabs.onRemoved.addListener(function(tabId) {
|
| - delete feedData[tabId];
|
| + localStorage.removeItem(tabId);
|
| });
|
|
|