| Index: chrome/browser/services/gcm/gcm_profile_service.h
|
| diff --git a/chrome/browser/services/gcm/gcm_profile_service.h b/chrome/browser/services/gcm/gcm_profile_service.h
|
| index 69f346f007455b7a0704493c45df930cb45557d1..bd1ccae5507ee4616090e92a091b5ddb610a726a 100644
|
| --- a/chrome/browser/services/gcm/gcm_profile_service.h
|
| +++ b/chrome/browser/services/gcm/gcm_profile_service.h
|
| @@ -10,7 +10,6 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/macros.h"
|
| #include "base/memory/scoped_ptr.h"
|
| -#include "chrome/browser/services/gcm/gcm_driver.h"
|
| #include "components/keyed_service/core/keyed_service.h"
|
|
|
| class Profile;
|
| @@ -21,8 +20,11 @@ class PrefRegistrySyncable;
|
|
|
| namespace gcm {
|
|
|
| -// A specialization of GCMDriver that is tied to a Profile.
|
| -class GCMProfileService : public GCMDriver, public KeyedService {
|
| +class GCMClientFactory;
|
| +class GCMDriver;
|
| +
|
| +// Providing GCM service, via GCMDriver, to a profile.
|
| +class GCMProfileService : public KeyedService {
|
| public:
|
| // Any change made to this enum should have corresponding change in the
|
| // GetGCMEnabledStateString(...) function.
|
| @@ -48,23 +50,22 @@ class GCMProfileService : public GCMDriver, public KeyedService {
|
| explicit GCMProfileService(Profile* profile);
|
| virtual ~GCMProfileService();
|
|
|
| + void Initialize(scoped_ptr<GCMClientFactory> gcm_client_factory);
|
| +
|
| // KeyedService:
|
| virtual void Shutdown() OVERRIDE;
|
|
|
| - // Returns the user name if the profile is signed in.
|
| - std::string SignedInUserName() const;
|
| + // For testing purpose.
|
| + void SetDriverForTesting(GCMDriver* driver);
|
|
|
| - protected:
|
| - // Overridden from GCMDriver:
|
| - virtual bool ShouldStartAutomatically() const OVERRIDE;
|
| - virtual base::FilePath GetStorePath() const OVERRIDE;
|
| - virtual scoped_refptr<net::URLRequestContextGetter>
|
| - GetURLRequestContextGetter() const OVERRIDE;
|
| + GCMDriver* driver() const { return driver_.get(); }
|
|
|
| private:
|
| // The profile which owns this object.
|
| Profile* profile_;
|
|
|
| + scoped_ptr<GCMDriver> driver_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(GCMProfileService);
|
| };
|
|
|
|
|