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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/event_router.h

Issue 553393002: Get rid of FileManagerPrivateAPI class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years, 3 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_manager/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_manager/event_router.h
diff --git a/chrome/browser/chromeos/extensions/file_manager/event_router.h b/chrome/browser/chromeos/extensions/file_manager/event_router.h
index d28ed321aacf2523dff6dae771b1b0c509187c9f..2fae6185324b1fa0ce42806fc4ae3b2d5910d489 100644
--- a/chrome/browser/chromeos/extensions/file_manager/event_router.h
+++ b/chrome/browser/chromeos/extensions/file_manager/event_router.h
@@ -24,6 +24,7 @@
#include "chrome/common/extensions/api/file_manager_private.h"
#include "chromeos/disks/disk_mount_manager.h"
#include "chromeos/network/network_state_handler_observer.h"
+#include "components/keyed_service/core/keyed_service.h"
#include "storage/browser/fileapi/file_system_operation.h"
class PrefChangeRegistrar;
@@ -48,7 +49,8 @@ class DeviceEventRouter;
// Monitors changes in disk mounts, network connection state and preferences
// affecting File Manager. Dispatches appropriate File Browser events.
-class EventRouter : public chromeos::NetworkStateHandlerObserver,
+class EventRouter : public KeyedService,
+ public chromeos::NetworkStateHandlerObserver,
public drive::FileSystemObserver,
public drive::JobListObserver,
public drive::DriveServiceObserver,
@@ -57,10 +59,8 @@ class EventRouter : public chromeos::NetworkStateHandlerObserver,
explicit EventRouter(Profile* profile);
virtual ~EventRouter();
- void Shutdown();
-
- // Starts observing file system change events.
- void ObserveEvents();
+ // KeyedService overrides.
+ virtual void Shutdown() OVERRIDE;
typedef base::Callback<void(bool success)> BoolCallback;
@@ -129,6 +129,9 @@ class EventRouter : public chromeos::NetworkStateHandlerObserver,
private:
typedef std::map<base::FilePath, FileWatcher*> WatcherMap;
+ // Starts observing file system change events.
+ void ObserveEvents();
+
// Called when prefs related to file manager change.
void OnFileManagerPrefsChanged();
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager/event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698