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

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

Issue 14577013: Files.app: Bring back the offline feature. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 7 years, 6 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 unified diff | Download patch
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 '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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 * @const 101 * @const
102 * @private 102 * @private
103 */ 103 */
104 DirectoryModel.fakeDriveRecentEntry_ = { 104 DirectoryModel.fakeDriveRecentEntry_ = {
105 fullPath: RootDirectory.DRIVE_RECENT, 105 fullPath: RootDirectory.DRIVE_RECENT,
106 isDirectory: true 106 isDirectory: true
107 }; 107 };
108 108
109 /** 109 /**
110 * List of fake entries for special searches. 110 * List of fake entries for special searches.
111 * TODO(haruki): Add the entry for "Recent".
112 * TODO(hirono): Bring back the entry for "Offline". http://crbug.com/238545
113 * 111 *
114 * @type {Array.<Object>} 112 * @type {Array.<Object>}
115 * @const 113 * @const
116 */ 114 */
117 DirectoryModel.FAKE_DRIVE_SPECIAL_SEARCH_ENTRIES = 115 DirectoryModel.FAKE_DRIVE_SPECIAL_SEARCH_ENTRIES = [
118 [DirectoryModel.fakeDriveSharedWithMeEntry_, 116 DirectoryModel.fakeDriveSharedWithMeEntry_,
119 DirectoryModel.fakeDriveRecentEntry_]; 117 DirectoryModel.fakeDriveRecentEntry_,
118 DirectoryModel.fakeDriveOfflineEntry_
119 ];
120 120
121 /** 121 /**
122 * DirectoryModel extends cr.EventTarget. 122 * DirectoryModel extends cr.EventTarget.
123 */ 123 */
124 DirectoryModel.prototype.__proto__ = cr.EventTarget.prototype; 124 DirectoryModel.prototype.__proto__ = cr.EventTarget.prototype;
125 125
126 /** 126 /**
127 * Enqueues an asynchronous closure. Guarantees that the closured are called 127 * Enqueues an asynchronous closure. Guarantees that the closured are called
128 * sequentially in order they are enqueued. Each of the closures added to the 128 * sequentially in order they are enqueued. Each of the closures added to the
129 * queue must call a callback once handling is completed. 129 * queue must call a callback once handling is completed.
(...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1541 }.bind(this)); 1541 }.bind(this));
1542 } 1542 }
1543 }; 1543 };
1544 1544
1545 /** 1545 /**
1546 * @return {DirectoryEntry} Current watched directory entry. 1546 * @return {DirectoryEntry} Current watched directory entry.
1547 */ 1547 */
1548 FileWatcher.prototype.getWatchedDirectoryEntry = function() { 1548 FileWatcher.prototype.getWatchedDirectoryEntry = function() {
1549 return this.watchedDirectoryEntry_; 1549 return this.watchedDirectoryEntry_;
1550 }; 1550 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698