Chromium Code Reviews| Index: components/gcm_driver/gcm_driver_desktop.h |
| diff --git a/components/gcm_driver/gcm_driver_desktop.h b/components/gcm_driver/gcm_driver_desktop.h |
| index 3c84d134e59c983430d978e030f24bea69431398..1c243b98cc2119cd3280d18256adaa427a8038f5 100644 |
| --- a/components/gcm_driver/gcm_driver_desktop.h |
| +++ b/components/gcm_driver/gcm_driver_desktop.h |
| @@ -16,7 +16,6 @@ |
| #include "base/memory/weak_ptr.h" |
| #include "components/gcm_driver/gcm_client.h" |
| #include "components/gcm_driver/gcm_driver.h" |
| -#include "google_apis/gaia/identity_provider.h" |
| namespace base { |
| class FilePath; |
| @@ -37,11 +36,10 @@ class GCMAppHandler; |
| class GCMClientFactory; |
| // GCMDriver implementation for desktop and Chrome OS, using GCMClient. |
| -class GCMDriverDesktop : public GCMDriver, public IdentityProvider::Observer { |
| +class GCMDriverDesktop : public GCMDriver { |
| public: |
| GCMDriverDesktop( |
| scoped_ptr<GCMClientFactory> gcm_client_factory, |
| - scoped_ptr<IdentityProvider> identity_provider, |
| const GCMClient::ChromeBuildInfo& chrome_build_info, |
| const base::FilePath& store_path, |
| const scoped_refptr<net::URLRequestContextGetter>& request_context, |
| @@ -50,12 +48,10 @@ class GCMDriverDesktop : public GCMDriver, public IdentityProvider::Observer { |
| const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner); |
| virtual ~GCMDriverDesktop(); |
| - // IdentityProvider::Observer implementation: |
| - virtual void OnActiveAccountLogin() OVERRIDE; |
| - virtual void OnActiveAccountLogout() OVERRIDE; |
| - |
| // GCMDriver overrides: |
| virtual void Shutdown() OVERRIDE; |
| + virtual void SignIn() OVERRIDE; |
| + virtual void Purge() OVERRIDE; |
| virtual void AddAppHandler(const std::string& app_id, |
| GCMAppHandler* handler) OVERRIDE; |
| virtual void RemoveAppHandler(const std::string& app_id) OVERRIDE; |
| @@ -70,7 +66,6 @@ class GCMDriverDesktop : public GCMDriver, public IdentityProvider::Observer { |
| bool clear_logs) OVERRIDE; |
| virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback, |
| bool recording) OVERRIDE; |
| - virtual std::string SignedInUserName() const OVERRIDE; |
| protected: |
| // GCMDriver implementation: |
| @@ -93,9 +88,6 @@ class GCMDriverDesktop : public GCMDriver, public IdentityProvider::Observer { |
| // Remove cached data when GCM service is stopped. |
| void RemoveCachedData(); |
| - // Checks out of GCM and erases any cached and persisted data. |
| - void CheckOut(); |
| - |
| void DoRegister(const std::string& app_id, |
| const std::vector<std::string>& sender_ids); |
| void DoUnregister(const std::string& app_id); |
| @@ -113,17 +105,19 @@ class GCMDriverDesktop : public GCMDriver, public IdentityProvider::Observer { |
| void GetGCMStatisticsFinished(const GCMClient::GCMStatistics& stats); |
| + // Flag to indicate if the sign-in is met. |
|
bartfab (slow)
2014/06/13 11:27:21
Nit: That sentence sounds odd. What does it mean f
jianli
2014/06/13 18:04:49
Done.
|
| + // TODO(jianli): to be removed when sign-in enforcement is dropped. |
|
bartfab (slow)
2014/06/13 11:27:21
Nit: s/to/To/
jianli
2014/06/13 18:04:49
Done.
|
| + bool signed_in_; |
| + |
| + // Flag to indicate if GCM is started. |
| + bool gcm_started_; |
| + |
| // Flag to indicate if GCM is enabled. |
| bool gcm_enabled_; |
| // Flag to indicate if GCMClient is ready. |
| bool gcm_client_ready_; |
| - // The account ID that this service is responsible for. Empty when the service |
| - // is not running. |
| - std::string account_id_; |
| - |
| - scoped_ptr<IdentityProvider> identity_provider_; |
| scoped_refptr<base::SequencedTaskRunner> ui_thread_; |
| scoped_refptr<base::SequencedTaskRunner> io_thread_; |