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

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

Issue 7745051: Added refresh on filesystem change (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rollback one file Created 9 years, 4 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
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);

Powered by Google App Engine
This is Rietveld 408576698