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

Unified Diff: chrome/browser/resources/file_manager/foreground/js/file_tasks.js

Issue 144783002: Simplify directory initialization in Files app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. 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/foreground/js/file_tasks.js
diff --git a/chrome/browser/resources/file_manager/foreground/js/file_tasks.js b/chrome/browser/resources/file_manager/foreground/js/file_tasks.js
index 506446146cb488a15f19e52965fd156e429df8db..1be3d031b632dc788f88d4e93e498364c4b13dad 100644
--- a/chrome/browser/resources/file_manager/foreground/js/file_tasks.js
+++ b/chrome/browser/resources/file_manager/foreground/js/file_tasks.js
@@ -626,10 +626,14 @@ FileTasks.prototype.openGalleryInternal_ = function(entries) {
if (this.params_ && this.params_.gallery) {
// Remove the Gallery state from the location, we do not need it any more.
- util.updateAppState(null /* keep path */, '' /* remove search. */);
+ // TODO(mtomasz): Consider keeping the selection path.
+ util.updateAppState(
+ null, /* keep current directory */
+ '', /* remove current selection */
+ '' /* remove search. */);
}
- var savedAppState = window.appState;
+ var savedAppState = JSON.parse(JSON.stringify(window.appState));
var savedTitle = document.title;
// Push a temporary state which will be replaced every time the selection

Powered by Google App Engine
This is Rietveld 408576698