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

Unified Diff: chrome/browser/sync/glue/sync_start_util.cc

Issue 15404005: sync: deferred initialization support for app/extension settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with util fix Created 7 years, 7 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/sync/glue/sync_start_util.cc
diff --git a/chrome/browser/sync/glue/sync_start_util.cc b/chrome/browser/sync/glue/sync_start_util.cc
index e3fd31fc80debb5aa82a046153a21f29c3f7598a..86c336bb780b102d8c3fbde4b7f7a0faea6def5e 100644
--- a/chrome/browser/sync/glue/sync_start_util.cc
+++ b/chrome/browser/sync/glue/sync_start_util.cc
@@ -18,6 +18,12 @@ namespace {
void StartSyncOnUIThread(const base::FilePath& profile,
syncer::ModelType type) {
ProfileManager* profile_manager = g_browser_process->profile_manager();
+ if (!profile_manager) {
+ // Can happen in tests.
+ DVLOG(2) << "No ProfileManager, can't start sync.";
+ return;
+ }
+
Profile* p = profile_manager->GetProfileByPath(profile);
if (!p) {
DVLOG(2) << "Profile not found, can't start sync.";

Powered by Google App Engine
This is Rietveld 408576698