| 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 51a98458a7e1e4dd43138ab20f11369a1db1e5d6..0ef949546fc0f6eda81afe1a65c0e739e3511299 100644
|
| --- a/components/gcm_driver/gcm_driver_desktop.h
|
| +++ b/components/gcm_driver/gcm_driver_desktop.h
|
| @@ -15,10 +15,13 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/observer_list.h"
|
| +#include "components/gcm_driver/gcm_channel_status_syncer.h"
|
| #include "components/gcm_driver/gcm_client.h"
|
| #include "components/gcm_driver/gcm_connection_observer.h"
|
| #include "components/gcm_driver/gcm_driver.h"
|
|
|
| +class PrefService;
|
| +
|
| namespace base {
|
| class FilePath;
|
| class SequencedTaskRunner;
|
| @@ -44,6 +47,7 @@ class GCMDriverDesktop : public GCMDriver {
|
| GCMDriverDesktop(
|
| scoped_ptr<GCMClientFactory> gcm_client_factory,
|
| const GCMClient::ChromeBuildInfo& chrome_build_info,
|
| + PrefService* prefs,
|
| const base::FilePath& store_path,
|
| const scoped_refptr<net::URLRequestContextGetter>& request_context,
|
| const scoped_refptr<base::SequencedTaskRunner>& ui_thread,
|
| @@ -84,6 +88,12 @@ class GCMDriverDesktop : public GCMDriver {
|
| void SetAccountsForCheckin(
|
| const std::map<std::string, std::string>& account_tokens);
|
|
|
| + // Exposed for testing purpose.
|
| + bool gcm_enabled() const { return gcm_enabled_; }
|
| + GCMChannelStatusSyncer* gcm_channel_status_syncer_for_testing() {
|
| + return gcm_channel_status_syncer_.get();
|
| + }
|
| +
|
| protected:
|
| // GCMDriver implementation:
|
| virtual GCMClient::Result EnsureStarted() OVERRIDE;
|
| @@ -125,6 +135,8 @@ class GCMDriverDesktop : public GCMDriver {
|
|
|
| void GetGCMStatisticsFinished(const GCMClient::GCMStatistics& stats);
|
|
|
| + scoped_ptr<GCMChannelStatusSyncer> gcm_channel_status_syncer_;
|
| +
|
| // Flag to indicate whether the user is signed in to a GAIA account.
|
| // TODO(jianli): To be removed when sign-in enforcement is dropped.
|
| bool signed_in_;
|
| @@ -133,6 +145,7 @@ class GCMDriverDesktop : public GCMDriver {
|
| bool gcm_started_;
|
|
|
| // Flag to indicate if GCM is enabled.
|
| + // TODO(jianli): Removed when we switch completely to support all users.
|
| bool gcm_enabled_;
|
|
|
| // Flag to indicate the last known state of the GCM client. Because this
|
|
|