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

Unified Diff: chrome/common/extensions/docs/examples/extensions/plugin_settings/js/plugin_settings.js

Issue 11745015: Update references to the extension messaging APIs to point to the "runtime" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/examples/extensions/plugin_settings/js/plugin_settings.js
diff --git a/chrome/common/extensions/docs/examples/extensions/plugin_settings/js/plugin_settings.js b/chrome/common/extensions/docs/examples/extensions/plugin_settings/js/plugin_settings.js
index 253240d72b8fb39bf1391cd2b29e3b55c1774ba0..fadf7cf65531f3072824967314ed0cb6e699aebc 100644
--- a/chrome/common/extensions/docs/examples/extensions/plugin_settings/js/plugin_settings.js
+++ b/chrome/common/extensions/docs/examples/extensions/plugin_settings/js/plugin_settings.js
@@ -51,7 +51,7 @@ cr.define('pluginSettings', function() {
* @private
*/
didClearRules_: function(callback) {
- if (chrome.extension.lastError) {
+ if (chrome.runtime.lastError) {
console.error('Error clearing rules');
callback();
return;
@@ -95,10 +95,10 @@ cr.define('pluginSettings', function() {
* @private
*/
didSetContentSetting_: function(plugin, pattern, key, counter, callback) {
- if (chrome.extension.lastError) {
+ if (chrome.runtime.lastError) {
console.error(
'Error restoring [' + key + ': ' + value + ']: ' +
- chrome.extension.lastError.message);
+ chrome.runtime.lastError.message);
window.localStorage.removeItem(key);
}
counter.value--;
@@ -124,8 +124,8 @@ cr.define('pluginSettings', function() {
'resourceIdentifier': { 'id': plugin },
'setting': setting,
}, function() {
- if (chrome.extension.lastError) {
- callback(chrome.extension.lastError.message);
+ if (chrome.runtime.lastError) {
+ callback(chrome.runtime.lastError.message);
} else {
window.localStorage.setItem(JSON.stringify([plugin, pattern]),
setting);

Powered by Google App Engine
This is Rietveld 408576698