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

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

Issue 11601005: [filemanager] Fix encoding issue in file watcher. (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 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 1333
1334 if (this.watchedDirectoryEntry_) 1334 if (this.watchedDirectoryEntry_)
1335 this.changeWatchedEntry(null); 1335 this.changeWatchedEntry(null);
1336 }; 1336 };
1337 1337
1338 /** 1338 /**
1339 * @param {Object} event chrome.fileBrowserPrivate.onDirectoryChanged event. 1339 * @param {Object} event chrome.fileBrowserPrivate.onDirectoryChanged event.
1340 * @private 1340 * @private
1341 */ 1341 */
1342 FileWatcher.prototype.onDirectoryChanged_ = function(event) { 1342 FileWatcher.prototype.onDirectoryChanged_ = function(event) {
1343 if (encodeURI(event.directoryUrl) == this.watchedDirectoryEntry_.toURL()) 1343 if (event.directoryUrl == this.watchedDirectoryEntry_.toURL())
1344 this.onFileInWatchedDirectoryChanged(); 1344 this.onFileInWatchedDirectoryChanged();
1345 }; 1345 };
1346 1346
1347 /** 1347 /**
1348 * Called when file in the watched directory changed. 1348 * Called when file in the watched directory changed.
1349 */ 1349 */
1350 FileWatcher.prototype.onFileInWatchedDirectoryChanged = function() { 1350 FileWatcher.prototype.onFileInWatchedDirectoryChanged = function() {
1351 this.dm_.rescanLater(); 1351 this.dm_.rescanLater();
1352 }; 1352 };
1353 1353
(...skipping 50 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