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

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: Cleaned up. 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 8346d8873c8c01d085da9505829eafe79ccb2817..474e9d9813f80a4900dbf493245940dffc4f7008 100644
--- a/chrome/browser/resources/file_manager/foreground/js/file_tasks.js
+++ b/chrome/browser/resources/file_manager/foreground/js/file_tasks.js
@@ -642,10 +642,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