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

Unified Diff: chrome/browser/chromeos/drive/drive_system_service.h

Issue 13976019: Reland of https://codereview.chromium.org/13891016/. This includes the fix for the Segfault on Chro… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Final rebase before dcommit attempt Created 7 years, 8 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/drive/drive_system_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6852a8d5862a138e302377397137a12b347885ae..5c8d56a742333474158ca683c5e6a3221b55b2ce 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/file_errors.h"
#include "chrome/browser/chromeos/drive/file_system_util.h"
#include "chrome/browser/chromeos/drive/job_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;
@@ -64,8 +64,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.
@@ -87,6 +88,9 @@ class DriveSystemService : public ProfileKeyedService,
void AddObserver(DriveSystemServiceObserver* observer);
void RemoveObserver(DriveSystemServiceObserver* observer);
+ // google_apis::DriveNotificationObserver implementation.
+ virtual void OnNotificationReceived() OVERRIDE;
+
google_apis::DriveServiceInterface* drive_service() {
return drive_service_.get();
}
@@ -108,16 +112,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();
@@ -157,9 +152,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<DriveCache, util::DestroyHelper> cache_;
scoped_ptr<google_apis::DriveServiceInterface> drive_service_;
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_system_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698