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

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

Issue 7243012: Change many extension event routers to not be singletons and to be more profile-aware. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bookmark remove observer Created 9 years, 6 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 | chrome/browser/chromeos/extensions/file_browser_event_router.cc » ('j') | 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.h
diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.h b/chrome/browser/chromeos/extensions/file_browser_event_router.h
index ebe4ebaac49e47ac47b91defe3f1ab221c09afc2..71f97193c09e6a2c2c101eb332d76e8312f03111 100644
--- a/chrome/browser/chromeos/extensions/file_browser_event_router.h
+++ b/chrome/browser/chromeos/extensions/file_browser_event_router.h
@@ -28,12 +28,10 @@ class SystemNotification;
class ExtensionFileBrowserEventRouter
: public chromeos::MountLibrary::Observer {
public:
- static ExtensionFileBrowserEventRouter* GetInstance();
+ explicit ExtensionFileBrowserEventRouter(Profile* profile);
+ virtual ~ExtensionFileBrowserEventRouter();
- // Starts/stops observing file system change events. Currently only
- // MountLibrary events are being observed.
- void ObserveFileSystemEvents(Profile* profile);
- void StopObservingFileSystemEvents();
+ void Init();
// File watch setup routines.
bool AddFileWatch(const FilePath& file_path,
@@ -49,7 +47,6 @@ class ExtensionFileBrowserEventRouter
const std::string& device_path);
private:
- friend struct DefaultSingletonTraits<ExtensionFileBrowserEventRouter>;
typedef std::map<std::string, linked_ptr<chromeos::SystemNotification> >
NotificationMap;
typedef std::map<std::string, std::string> MountPointMap;
@@ -80,9 +77,6 @@ class ExtensionFileBrowserEventRouter
void HandleFileWatchOnUIThread(const FilePath& local_path, bool got_error);
};
- ExtensionFileBrowserEventRouter();
- virtual ~ExtensionFileBrowserEventRouter();
-
// USB mount event handlers.
void OnDiskAdded(const chromeos::MountLibrary::Disk* disk);
void OnDiskRemoved(const chromeos::MountLibrary::Disk* disk);
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_browser_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698