| 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 // 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 get offline() { | 154 get offline() { |
| 155 return this.offline_; | 155 return this.offline_; |
| 156 }, | 156 }, |
| 157 set offline(value) { | 157 set offline(value) { |
| 158 if (this.offline_ != value) { | 158 if (this.offline_ != value) { |
| 159 this.offline_ = !!value; | 159 this.offline_ = !!value; |
| 160 this.updateReadonlyStatus_(); | 160 this.updateReadonlyStatus_(); |
| 161 } | 161 } |
| 162 }, | 162 }, |
| 163 | 163 |
| 164 get isSystemDirectoy() { | 164 get isOnGData() { |
| 165 return this.rootPath == '/' + DirectoryModel.GDATA_DIRECTORY; |
| 166 }, |
| 167 |
| 168 get isSystemDirectory() { |
| 165 var path = this.currentEntry.fullPath; | 169 var path = this.currentEntry.fullPath; |
| 166 return path == '/' || | 170 return path == '/' || |
| 167 path == '/' + DirectoryModel.REMOVABLE_DIRECTORY || | 171 path == '/' + DirectoryModel.REMOVABLE_DIRECTORY || |
| 168 path == '/' + DirectoryModel.ARCHIVE_DIRECTORY; | 172 path == '/' + DirectoryModel.ARCHIVE_DIRECTORY; |
| 169 }, | 173 }, |
| 170 | 174 |
| 171 get filterHidden() { | 175 get filterHidden() { |
| 172 return !!this.filters_['hidden']; | 176 return !!this.filters_['hidden']; |
| 173 }, | 177 }, |
| 174 | 178 |
| (...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 /** | 1251 /** |
| 1248 * @private | 1252 * @private |
| 1249 */ | 1253 */ |
| 1250 DirectoryModel.Scanner.prototype.recordMetrics_ = function() { | 1254 DirectoryModel.Scanner.prototype.recordMetrics_ = function() { |
| 1251 metrics.recordInterval('DirectoryScan'); | 1255 metrics.recordInterval('DirectoryScan'); |
| 1252 if (this.dir_.fullPath == | 1256 if (this.dir_.fullPath == |
| 1253 '/' + DirectoryModel.DOWNLOADS_DIRECTORY) { | 1257 '/' + DirectoryModel.DOWNLOADS_DIRECTORY) { |
| 1254 metrics.recordMediumCount('DownloadsCount', this.list_.length); | 1258 metrics.recordMediumCount('DownloadsCount', this.list_.length); |
| 1255 } | 1259 } |
| 1256 }; | 1260 }; |
| OLD | NEW |