Chromium Code Reviews| Index: chrome/browser/profiles/profile_impl.cc |
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
| index d4f24d890c29ce168bf401d43e547364158f5b2e..aa727fe8d738c08242ae9d5e2835106f81d6faf2 100644 |
| --- a/chrome/browser/profiles/profile_impl.cc |
| +++ b/chrome/browser/profiles/profile_impl.cc |
| @@ -1248,12 +1248,10 @@ TokenService* ProfileImpl::GetTokenService() { |
| ProfileSyncService* ProfileImpl::GetProfileSyncService() { |
| #if defined(OS_CHROMEOS) |
| - // If kLoginManager is specified, we shouldn't call this unless login has |
|
akalin
2011/01/13 04:15:02
Hmm. I'd rather callers explicitly check HasProfi
stevenjb
2011/01/13 18:00:49
Originally I added checks in the settings code, bu
|
| - // completed and specified cros_user. Guard with if (HasProfileSyncService()) |
| - // where this might legitimately get called before login has completed. |
| - if (!sync_service_.get() && |
| - CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginManager)) { |
| - LOG(FATAL) << "GetProfileSyncService() called before login complete."; |
| + if (!sync_service_.get()) { |
| + // In ChromeOS, we only want to initialize sync services explicitly from |
| + // the login code. Use HasProfileSyncService() to guard against this. |
| + return NULL; |
| } |
| #endif |
| return GetProfileSyncService(""); |