Chromium Code Reviews| Index: chrome/browser/chromeos/drive/drive_system_service.h |
| diff --git a/chrome/browser/chromeos/drive/drive_system_service.h b/chrome/browser/chromeos/drive/drive_system_service.h |
| index 0ad2f0588ead45235ec711f75ed0cf2f3503beb0..7d41219617fa9c013e79fed23e8d42ae9684a45f 100644 |
| --- a/chrome/browser/chromeos/drive/drive_system_service.h |
| +++ b/chrome/browser/chromeos/drive/drive_system_service.h |
| @@ -16,9 +16,9 @@ |
| #include "chrome/browser/chromeos/drive/drive_file_error.h" |
| #include "chrome/browser/chromeos/drive/drive_file_system_util.h" |
| #include "chrome/browser/chromeos/drive/drive_scheduler.h" |
| +#include "chrome/browser/google_apis/drive_notification_observer.h" |
| #include "chrome/browser/profiles/profile_keyed_service.h" |
| #include "chrome/browser/profiles/profile_keyed_service_factory.h" |
| -#include "sync/notifier/invalidation_handler.h" |
| namespace base { |
| class FilePath; |
| @@ -65,8 +65,9 @@ class DriveSystemServiceObserver { |
| // The class is essentially a container that manages lifetime of the objects |
| // that are used to run the Drive system. The DriveSystemService object is |
| // created per-profile. |
| -class DriveSystemService : public ProfileKeyedService, |
| - public syncer::InvalidationHandler { |
| +class DriveSystemService |
| + : public ProfileKeyedService, |
| + public google_apis::DriveNotificationObserver { |
| public: |
| // test_drive_service, test_cache_root and test_file_system are used by tests |
| // to inject customized instances. |
| @@ -88,6 +89,9 @@ class DriveSystemService : public ProfileKeyedService, |
| void AddObserver(DriveSystemServiceObserver* observer); |
| void RemoveObserver(DriveSystemServiceObserver* observer); |
| + // google_apis::DriveNotificationObserver implementation. |
| + virtual void CheckForUpdates() OVERRIDE; |
|
satorux1
2013/04/19 07:28:25
I found it rather unusual for a function name of a
calvinlo
2013/04/19 07:54:06
Done. Originally I called it CheckForUpdates becau
|
| + |
| google_apis::DriveServiceInterface* drive_service() { |
| return drive_service_.get(); |
| } |
| @@ -110,16 +114,7 @@ class DriveSystemService : public ProfileKeyedService, |
| // Reloads and remounts the file system. |
| void ReloadAndRemountFileSystem(); |
| - // Returns true if the push notification is enabled. |
| - bool PushNotificationEnabled(); |
| - |
| private: |
| - // syncer::InvalidationHandler implementation. |
| - virtual void OnInvalidatorStateChange( |
| - syncer::InvalidatorState state) OVERRIDE; |
| - virtual void OnIncomingInvalidation( |
| - const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE; |
| - |
| // Returns true if Drive is enabled. |
| // Must be called on UI thread. |
| bool IsDriveEnabled(); |
| @@ -159,9 +154,6 @@ class DriveSystemService : public ProfileKeyedService, |
| // True if Drive is disabled due to initialization errors. |
| bool drive_disabled_; |
| - // True once this is registered to listen to the Drive updates. |
| - bool push_notification_registered_; |
| - |
| scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
| scoped_ptr<EventLogger> event_logger_; |
| scoped_ptr<DriveCache, util::DestroyHelper> cache_; |