Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3525)

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 6260002: Fix chromium-os:10777 and other sync related crashes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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("");
« chrome/browser/dom_ui/dom_ui.h ('K') | « chrome/browser/dom_ui/options/sync_options_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698