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

Unified Diff: chrome/browser/dom_ui/options/sync_options_handler.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/dom_ui/options/sync_options_handler.cc
diff --git a/chrome/browser/dom_ui/options/sync_options_handler.cc b/chrome/browser/dom_ui/options/sync_options_handler.cc
index e67050c4fb9afb39742081fdb0aea50a3d9483d9..75bae5b61134a0fd0126fee2c83fb488335b7b36 100644
--- a/chrome/browser/dom_ui/options/sync_options_handler.cc
+++ b/chrome/browser/dom_ui/options/sync_options_handler.cc
@@ -59,10 +59,9 @@ void SyncOptionsHandler::GetLocalizedValues(
void SyncOptionsHandler::Initialize() {
ProfileSyncService* service =
- dom_ui_->GetProfile()->GetOriginalProfile()->GetProfileSyncService();
- // If service is unavailable for some good reason, 'IsEnabled()' method
- // should return false. Otherwise something is broken.
- DCHECK(service);
+ dom_ui_->GetOriginalProfile()->GetProfileSyncService();
+ if (!service)
+ return; // Can happen in ChromeOS if called before login.
DictionaryValue args;
SyncSetupFlow::GetArgsForConfigure(service, &args);

Powered by Google App Engine
This is Rietveld 408576698