Chromium Code Reviews| Index: chrome/browser/chromeos/extensions/file_browser_event_router.h |
| diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.h b/chrome/browser/chromeos/extensions/file_browser_event_router.h |
| index 835564974c0bf2d8a3c431149e8814c3e4b752dc..542feb3d7c40b40e244baac5c5185f8d38901347 100644 |
| --- a/chrome/browser/chromeos/extensions/file_browser_event_router.h |
| +++ b/chrome/browser/chromeos/extensions/file_browser_event_router.h |
| @@ -60,18 +60,28 @@ class ExtensionFileBrowserEventRouter |
| typedef std::map<std::string, linked_ptr<chromeos::SystemNotification> > |
| NotificationMap; |
| typedef std::map<std::string, std::string> MountPointMap; |
| + typedef std::map<std::string, int> ExtensionUsageRegistry; |
| + |
| typedef struct FileWatcherExtensions { |
|
zel
2011/09/12 15:58:42
let's make this a class now since it's not just co
Dmitry Zvorygin
2011/09/14 10:15:49
Done.
|
| FileWatcherExtensions(const FilePath& path, |
| - const std::string& extension_id) { |
| - file_watcher.reset(new base::files::FilePathWatcher()); |
| - virtual_path = path; |
| - extensions.insert(extension_id); |
| - } |
| + const std::string& extension_id); |
| + |
| ~FileWatcherExtensions() {} |
| linked_ptr<base::files::FilePathWatcher> file_watcher; |
| FilePath local_path; |
| FilePath virtual_path; |
| - std::set<std::string> extensions; |
| + |
| + void AddExtension(const std::string& extension_id); |
| + |
| + void RemoveExtension(const std::string& extension_id); |
| + |
| + const ExtensionUsageRegistry& GetExtensions() const; |
| + |
| + unsigned int GetRefCount() const; |
| + |
| + private: |
| + ExtensionUsageRegistry extensions; |
| + unsigned int ref_count; |
| } FileWatcherProcess; |
| typedef std::map<FilePath, FileWatcherExtensions*> WatcherMap; |
| @@ -112,7 +122,7 @@ class ExtensionFileBrowserEventRouter |
| // Sends folder change event. |
| void DispatchFolderChangeEvent(const FilePath& path, bool error, |
| - const std::set<std::string>& extensions); |
| + const ExtensionUsageRegistry& extensions); |
| // Sends filesystem changed extension message to all renderers. |
| void DispatchMountEvent(const chromeos::MountLibrary::Disk* disk, bool added); |