| 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.
|
|
|