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

Unified Diff: ui/file_manager/file_manager/common/js/util.js

Issue 2578863003: Files app: Handle chrome.runtime.lastError for chrome.storage API calls. (Closed)
Patch Set: Append chrome.runtime.lastError.message for error messages. Created 4 years 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
« no previous file with comments | « no previous file | ui/file_manager/file_manager/foreground/js/app_state_controller.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/common/js/util.js
diff --git a/ui/file_manager/file_manager/common/js/util.js b/ui/file_manager/file_manager/common/js/util.js
index 1f0a9de1a534e4f9123d7d8fb118bb12f7c30557..f5a0455729d33f3a55142f9127cdaa790a276f56 100644
--- a/ui/file_manager/file_manager/common/js/util.js
+++ b/ui/file_manager/file_manager/common/js/util.js
@@ -387,7 +387,11 @@ util.saveAppState = function() {
var items = {};
items[window.appID] = JSON.stringify(window.appState);
- chrome.storage.local.set(items);
+ chrome.storage.local.set(items, function() {
+ if (chrome.runtime.lastError)
+ console.error('Failed to save app state: ' +
+ chrome.runtime.lastError.message);
+ });
};
/**
« no previous file with comments | « no previous file | ui/file_manager/file_manager/foreground/js/app_state_controller.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698