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

Unified Diff: chrome/browser/resources/file_manager/common/js/util.js

Issue 132453007: Migrate fullPaths to URLs in appState. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 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/browser/resources/file_manager/common/js/util.js
diff --git a/chrome/browser/resources/file_manager/common/js/util.js b/chrome/browser/resources/file_manager/common/js/util.js
index 8494abcf541901894d5fe094ad6cd33c04af7ca8..2fa30ecb437545fbfa7271c029e23893a4e35937 100644
--- a/chrome/browser/resources/file_manager/common/js/util.js
+++ b/chrome/browser/resources/file_manager/common/js/util.js
@@ -684,23 +684,22 @@ util.createChild = function(parent, opt_className, opt_tag) {
/**
* Updates the app state.
- * TODO(mtomasz): Migrate to URLs.
*
- * @param {string} currentDirectoryPath Currently opened path. If null the path
- * is left unchanged.
- * @param {string} selectionPath Currently selected path. If null the path is
-* left unchanged.
+ * @param {string} currentDirectoryURL Currently opened directory as an URL.
+ * If null the value is left unchanged.
+ * @param {string} selectionURL Currently selected entry as an URL. If null the
+ * value is left unchanged.
* @param {string|Object=} opt_param Additional parameters, to be stored. If
* null, then left unchanged.
*/
-util.updateAppState = function(currentDirectoryPath, selectionPath, opt_param) {
+util.updateAppState = function(currentDirectoryURL, selectionURL, opt_param) {
window.appState = window.appState || {};
if (opt_param !== undefined && opt_param !== null)
window.appState.params = opt_param;
- if (currentDirectoryPath !== null)
- window.appState.currentDirectoryPath = currentDirectoryPath;
- if (selectionPath !== null)
- window.appState.selectionPath = selectionPath;
+ if (currentDirectoryURL !== null)
+ window.appState.currentDirectoryURL = currentDirectoryURL;
+ if (selectionURL !== null)
+ window.appState.selectionURL = selectionURL;
util.saveAppState();
};

Powered by Google App Engine
This is Rietveld 408576698