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

Side by Side Diff: chrome/browser/resources/file_manager/js/file_manager.js

Issue 11411317: Preserving target file name in the save as dialog if target directory doesn't exist. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/file_manager/js/directory_model.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * FileManager constructor. 6 * FileManager constructor.
7 * 7 *
8 * FileManager objects encapsulate the functionality of the file selector 8 * FileManager objects encapsulate the functionality of the file selector
9 * dialogs, as well as the full screen file manager application (though the 9 * dialogs, as well as the full screen file manager application (though the
10 * latter is not yet implemented). 10 * latter is not yet implemented).
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 this.dialogType == DialogType.FULL_PAGE; 1301 this.dialogType == DialogType.FULL_PAGE;
1302 1302
1303 if (PathUtil.getRootType(path) === RootType.GDATA) { 1303 if (PathUtil.getRootType(path) === RootType.GDATA) {
1304 var tracker = this.directoryModel_.createDirectoryChangeTracker(); 1304 var tracker = this.directoryModel_.createDirectoryChangeTracker();
1305 // Expected finish of setupPath to GData. 1305 // Expected finish of setupPath to GData.
1306 tracker.exceptInitialChange = true; 1306 tracker.exceptInitialChange = true;
1307 tracker.start(); 1307 tracker.start();
1308 if (!this.isGDataEnabled()) { 1308 if (!this.isGDataEnabled()) {
1309 if (pageLoading) 1309 if (pageLoading)
1310 this.show_(); 1310 this.show_();
1311 this.directoryModel_.setupDefaultPath(); 1311 var leafName = path.substr(path.indexOf('/') + 1);
1312 path = this.directoryModel_.getDefaultDirectory() + '/' + leafName;
1313 this.finishSetupCurrentDirectory_(path, invokeHandlers);
1312 return; 1314 return;
1313 } 1315 }
1314 var gdataPath = RootDirectory.GDATA; 1316 var gdataPath = RootDirectory.GDATA;
1315 if (this.volumeManager_.isMounted(gdataPath)) { 1317 if (this.volumeManager_.isMounted(gdataPath)) {
1316 this.finishSetupCurrentDirectory_(path, invokeHandlers); 1318 this.finishSetupCurrentDirectory_(path, invokeHandlers);
1317 return; 1319 return;
1318 } 1320 }
1319 if (pageLoading) 1321 if (pageLoading)
1320 this.delayShow_(500); 1322 this.delayShow_(500);
1321 // Reflect immediatelly in the UI we are on GData and display 1323 // Reflect immediatelly in the UI we are on GData and display
(...skipping 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after
3376 return this.directoryModel_.getFileList(); 3378 return this.directoryModel_.getFileList();
3377 }; 3379 };
3378 3380
3379 /** 3381 /**
3380 * @return {cr.ui.List} Current list object. 3382 * @return {cr.ui.List} Current list object.
3381 */ 3383 */
3382 FileManager.prototype.getCurrentList = function() { 3384 FileManager.prototype.getCurrentList = function() {
3383 return this.currentList_; 3385 return this.currentList_;
3384 }; 3386 };
3385 })(); 3387 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/directory_model.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698