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 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" | 5 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/prefs/public/pref_change_registrar.h" | 10 #include "base/prefs/public/pref_change_registrar.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 this, true)); | 190 this, true)); |
191 } | 191 } |
192 | 192 |
193 WatcherMap::iterator iter = file_watchers_.find(watch_path); | 193 WatcherMap::iterator iter = file_watchers_.find(watch_path); |
194 if (iter == file_watchers_.end()) { | 194 if (iter == file_watchers_.end()) { |
195 scoped_ptr<FileWatcherExtensions> | 195 scoped_ptr<FileWatcherExtensions> |
196 watch(new FileWatcherExtensions(virtual_path, | 196 watch(new FileWatcherExtensions(virtual_path, |
197 extension_id, | 197 extension_id, |
198 is_remote_watch)); | 198 is_remote_watch)); |
199 | 199 |
200 if (watch->Watch(watch_path, delegate_.get())) | 200 if (watch->Watch(watch_path, false, delegate_.get())) |
201 file_watchers_[watch_path] = watch.release(); | 201 file_watchers_[watch_path] = watch.release(); |
202 else | 202 else |
203 return false; | 203 return false; |
204 } else { | 204 } else { |
205 iter->second->AddExtension(extension_id); | 205 iter->second->AddExtension(extension_id); |
206 } | 206 } |
207 return true; | 207 return true; |
208 } | 208 } |
209 | 209 |
210 void FileBrowserEventRouter::RemoveFileWatch( | 210 void FileBrowserEventRouter::RemoveFileWatch( |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 return scoped_refptr<RefcountedProfileKeyedService>( | 875 return scoped_refptr<RefcountedProfileKeyedService>( |
876 new FileBrowserEventRouter(profile)); | 876 new FileBrowserEventRouter(profile)); |
877 } | 877 } |
878 | 878 |
879 bool FileBrowserEventRouterFactory::ServiceHasOwnInstanceInIncognito() const { | 879 bool FileBrowserEventRouterFactory::ServiceHasOwnInstanceInIncognito() const { |
880 // Explicitly and always allow this router in guest login mode. see | 880 // Explicitly and always allow this router in guest login mode. see |
881 // chrome/browser/profiles/profile_keyed_base_factory.h comment | 881 // chrome/browser/profiles/profile_keyed_base_factory.h comment |
882 // for the details. | 882 // for the details. |
883 return true; | 883 return true; |
884 } | 884 } |
OLD | NEW |