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

Unified Diff: chrome/browser/chromeos/extensions/file_browser_event_router.cc

Issue 10293002: gdata: Properly remove file watchers on gdata. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_browser_event_router.cc
diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.cc b/chrome/browser/chromeos/extensions/file_browser_event_router.cc
index 716a818610e34f8a2a345047f1b4a5b494bef709..ac6589fb4ab0a4aafbdb1f332e0b4546b681653b 100644
--- a/chrome/browser/chromeos/extensions/file_browser_event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_event_router.cc
@@ -171,7 +171,14 @@ void FileBrowserEventRouter::RemoveFileWatch(
const FilePath& local_path,
const std::string& extension_id) {
base::AutoLock lock(lock_);
- WatcherMap::iterator iter = file_watchers_.find(local_path);
+ FilePath watch_path = local_path;
+ // Tweak watch path for remote sources - we need to drop leading /special
+ // directory from there in order to be able to pair these events with
+ // their change notifications.
+ if (gdata::util::GetSpecialRemoteRootPath().IsParent(watch_path)) {
+ watch_path = gdata::util::ExtractGDataPath(watch_path);
+ }
+ WatcherMap::iterator iter = file_watchers_.find(watch_path);
if (iter == file_watchers_.end())
return;
// Remove the renderer process for this watch.
« 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