| Index: chrome/browser/services/gcm/gcm_profile_service_factory.cc
|
| diff --git a/chrome/browser/services/gcm/gcm_profile_service_factory.cc b/chrome/browser/services/gcm/gcm_profile_service_factory.cc
|
| index aff75d89c5d017478446879f41fd05ac13f3b9db..c5b2469073530f9c970ccbc2ccf0f2db328ae997 100644
|
| --- a/chrome/browser/services/gcm/gcm_profile_service_factory.cc
|
| +++ b/chrome/browser/services/gcm/gcm_profile_service_factory.cc
|
| @@ -14,7 +14,8 @@ namespace gcm {
|
|
|
| // static
|
| GCMProfileService* GCMProfileServiceFactory::GetForProfile(Profile* profile) {
|
| - if (!gcm::GCMProfileService::IsGCMEnabled(profile))
|
| + // GCM is not supported in incognito mode.
|
| + if (profile->IsOffTheRecord())
|
| return NULL;
|
|
|
| return static_cast<GCMProfileService*>(
|
| @@ -38,8 +39,6 @@ GCMProfileServiceFactory::~GCMProfileServiceFactory() {
|
| BrowserContextKeyedService* GCMProfileServiceFactory::BuildServiceInstanceFor(
|
| content::BrowserContext* context) const {
|
| Profile* profile = static_cast<Profile*>(context);
|
| - if (!gcm::GCMProfileService::IsGCMEnabled(profile))
|
| - return NULL;
|
| GCMProfileService* service = new GCMProfileService(profile);
|
| scoped_ptr<GCMClientFactory> gcm_client_factory(new GCMClientFactory);
|
| service->Initialize(gcm_client_factory.Pass());
|
|
|