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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 } | 49 } |
50 | 50 |
51 /** | 51 /** |
52 * Fake entry to be used in currentDirEntry_ when current directory is | 52 * Fake entry to be used in currentDirEntry_ when current directory is |
53 * unmounted DRIVE. TODO(haruki): Support "drive/root" and "drive/other". | 53 * unmounted DRIVE. TODO(haruki): Support "drive/root" and "drive/other". |
54 * @type {Object} | 54 * @type {Object} |
55 * @const | 55 * @const |
56 * @private | 56 * @private |
57 */ | 57 */ |
58 DirectoryModel.fakeDriveEntry_ = { | 58 DirectoryModel.fakeDriveEntry_ = { |
59 fullPath: RootDirectory.DRIVE, | 59 fullPath: RootDirectory.DRIVE + '/' + DriveSubRootDirectory.ROOT, |
60 isDirectory: true | 60 isDirectory: true |
61 }; | 61 }; |
62 | 62 |
63 /** | 63 /** |
64 * Fake entry representing a psuedo directory, which contains Drive files | 64 * Fake entry representing a psuedo directory, which contains Drive files |
65 * available offline. This entry works as a trigger to start a search using | 65 * available offline. This entry works as a trigger to start a search using |
66 * DirectoryContentsDriveOffline. specialSearch() must be called to start a | 66 * DirectoryContentsDriveOffline. specialSearch() must be called to start a |
67 * special search. | 67 * special search. |
68 * @type {Object} | 68 * @type {Object} |
69 * @const | 69 * @const |
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1448 }.bind(this)); | 1448 }.bind(this)); |
1449 } | 1449 } |
1450 }; | 1450 }; |
1451 | 1451 |
1452 /** | 1452 /** |
1453 * @return {DirectoryEntry} Current watched directory entry. | 1453 * @return {DirectoryEntry} Current watched directory entry. |
1454 */ | 1454 */ |
1455 FileWatcher.prototype.getWatchedDirectoryEntry = function() { | 1455 FileWatcher.prototype.getWatchedDirectoryEntry = function() { |
1456 return this.watchedDirectoryEntry_; | 1456 return this.watchedDirectoryEntry_; |
1457 }; | 1457 }; |
OLD | NEW |