| Index: chrome/browser/invalidation/invalidation_service_factory.cc
|
| diff --git a/chrome/browser/invalidation/invalidation_service_factory.cc b/chrome/browser/invalidation/invalidation_service_factory.cc
|
| index 138b526f1b9e41694bb09f93021fd66afc391b8c..747bc9320bdc083cd56f902c60b3b1b3322c1e63 100644
|
| --- a/chrome/browser/invalidation/invalidation_service_factory.cc
|
| +++ b/chrome/browser/invalidation/invalidation_service_factory.cc
|
| @@ -30,6 +30,7 @@
|
| #if defined(OS_CHROMEOS)
|
| #include "chrome/browser/chromeos/login/user_manager.h"
|
| #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
|
| +#include "chrome/browser/chromeos/profiles/profile_helper.h"
|
| #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h"
|
| #include "chrome/browser/invalidation/device_invalidation_auth_provider_chromeos.h"
|
| #endif
|
| @@ -39,6 +40,15 @@ namespace invalidation {
|
| // static
|
| InvalidationService* InvalidationServiceFactory::GetForProfile(
|
| Profile* profile) {
|
| +#if defined(OS_CHROMEOS)
|
| + if (profile->IsSameProfile(chromeos::ProfileHelper::GetSigninProfile()) ||
|
| + (chromeos::UserManager::IsInitialized() &&
|
| + chromeos::UserManager::Get()->IsLoggedInAsGuest())) {
|
| + // The Chrome OS login and Chrome OS guest profiles do not have GAIA
|
| + // credentials and do not support invalidation.
|
| + return NULL;
|
| + }
|
| +#endif
|
| return static_cast<InvalidationService*>(
|
| GetInstance()->GetServiceForBrowserContext(profile, true));
|
| }
|
|
|