OLD | NEW |
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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 // If directory files changes too often, don't rescan directory more than once | 7 // If directory files changes too often, don't rescan directory more than once |
8 // per specified interval | 8 // per specified interval |
9 var SIMULTANEOUS_RESCAN_INTERVAL = 1000; | 9 var SIMULTANEOUS_RESCAN_INTERVAL = 1000; |
10 // Used for operations that require almost instant rescan. | 10 // Used for operations that require almost instant rescan. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 } | 45 } |
46 | 46 |
47 /** | 47 /** |
48 * Fake entry to be used in currentDirEntry_ when current directory is | 48 * Fake entry to be used in currentDirEntry_ when current directory is |
49 * unmounted DRIVE. TODO(haruki): Support "drive/root" and "drive/other". | 49 * unmounted DRIVE. TODO(haruki): Support "drive/root" and "drive/other". |
50 * @type {Object} | 50 * @type {Object} |
51 * @const | 51 * @const |
52 * @private | 52 * @private |
53 */ | 53 */ |
54 DirectoryModel.fakeDriveEntry_ = { | 54 DirectoryModel.fakeDriveEntry_ = { |
55 fullPath: RootDirectory.DRIVE, | 55 fullPath: RootDirectory.DRIVE + '/' + DriveSubRootDirectory.ROOT, |
56 isDirectory: true | 56 isDirectory: true |
57 }; | 57 }; |
58 | 58 |
59 /** | 59 /** |
60 * Fake entry representing a psuedo directory, which contains Drive files | 60 * Fake entry representing a psuedo directory, which contains Drive files |
61 * available offline. This entry works as a trigger to start a search using | 61 * available offline. This entry works as a trigger to start a search using |
62 * DirectoryContentsDriveOffline. specialSearch() must be called to start a | 62 * DirectoryContentsDriveOffline. specialSearch() must be called to start a |
63 * special search. | 63 * special search. |
64 * @type {Object} | 64 * @type {Object} |
65 * @const | 65 * @const |
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1457 }.bind(this)); | 1457 }.bind(this)); |
1458 } | 1458 } |
1459 }; | 1459 }; |
1460 | 1460 |
1461 /** | 1461 /** |
1462 * @return {DirectoryEntry} Current watched directory entry. | 1462 * @return {DirectoryEntry} Current watched directory entry. |
1463 */ | 1463 */ |
1464 FileWatcher.prototype.getWatchedDirectoryEntry = function() { | 1464 FileWatcher.prototype.getWatchedDirectoryEntry = function() { |
1465 return this.watchedDirectoryEntry_; | 1465 return this.watchedDirectoryEntry_; |
1466 }; | 1466 }; |
OLD | NEW |