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

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

Issue 11574034: [filemanager] Fix startup initialization: set current root dir before updating roots. (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 | « no previous file | 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 // If directory files changes too often, don't rescan directory more than once 5 // If directory files changes too often, don't rescan directory more than once
6 // per specified interval 6 // per specified interval
7 var SIMULTANEOUS_RESCAN_INTERVAL = 1000; 7 var SIMULTANEOUS_RESCAN_INTERVAL = 1000;
8 // Used for operations that require almost instant rescan. 8 // Used for operations that require almost instant rescan.
9 var SHORT_RESCAN_INTERVAL = 100; 9 var SHORT_RESCAN_INTERVAL = 100;
10 10
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 function onScanComplete() { 763 function onScanComplete() {
764 if (opt_callback) 764 if (opt_callback)
765 opt_callback(); 765 opt_callback();
766 // For tests that open the dialog to empty directories, everything 766 // For tests that open the dialog to empty directories, everything
767 // is loaded at this point. 767 // is loaded at this point.
768 chrome.test.sendMessage('directory-change-complete'); 768 chrome.test.sendMessage('directory-change-complete');
769 } 769 }
770 this.clearAndScan_(new DirectoryContentsBasic(this.currentFileListContext_, 770 this.clearAndScan_(new DirectoryContentsBasic(this.currentFileListContext_,
771 dirEntry), 771 dirEntry),
772 onScanComplete.bind(this)); 772 onScanComplete.bind(this));
773 this.currentDirByRoot_[this.getCurrentRootPath()] = dirEntry.fullPath;
773 this.updateRootsListSelection_(); 774 this.updateRootsListSelection_();
774 this.currentDirByRoot_[this.getCurrentRootPath()] = dirEntry.fullPath;
775 }; 775 };
776 776
777 /** 777 /**
778 * Change the current directory to the directory represented by a 778 * Change the current directory to the directory represented by a
779 * DirectoryEntry. 779 * DirectoryEntry.
780 * 780 *
781 * Dispatches the 'directory-changed' event when the directory is successfully 781 * Dispatches the 'directory-changed' event when the directory is successfully
782 * changed. 782 * changed.
783 * 783 *
784 * @private 784 * @private
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 }.bind(this)); 1404 }.bind(this));
1405 } 1405 }
1406 }; 1406 };
1407 1407
1408 /** 1408 /**
1409 * @return {DirectoryEntry} Current watched directory entry. 1409 * @return {DirectoryEntry} Current watched directory entry.
1410 */ 1410 */
1411 FileWatcher.prototype.getWatchedDirectoryEntry = function() { 1411 FileWatcher.prototype.getWatchedDirectoryEntry = function() {
1412 return this.watchedDirectoryEntry_; 1412 return this.watchedDirectoryEntry_;
1413 }; 1413 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698