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

Unified Diff: chrome/browser/ui/webui/settings/people_handler.cc

Issue 2603453002: MD Settings: Fix policy-related reentrancy crash for People page. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/settings/people_handler.cc
diff --git a/chrome/browser/ui/webui/settings/people_handler.cc b/chrome/browser/ui/webui/settings/people_handler.cc
index 35e1d2d647d54b174c0d7ead91622acbcbad0087..d31837e724734edb75fc6eb5fa96ba0c62f84fb4 100644
--- a/chrome/browser/ui/webui/settings/people_handler.cc
+++ b/chrome/browser/ui/webui/settings/people_handler.cc
@@ -328,8 +328,6 @@ void PeopleHandler::DisplaySpinner() {
base::StringValue(kSpinnerPageStatus));
}
-// TODO(kochi): Handle error conditions other than timeout.
-// http://crbug.com/128692
void PeopleHandler::DisplayTimeout() {
// Stop a timer to handle timeout in waiting for checking network connection.
engine_start_timer_.reset();
@@ -779,6 +777,10 @@ void PeopleHandler::PushSyncPrefs() {
ProfileSyncService* service = GetSyncService();
DCHECK(service);
if (!service->IsEngineInitialized()) {
+ // Requesting the sync service to start may trigger another reentrant call
+ // to PushSyncPrefs. Setting up the startup tracker beforehand correctly
+ // signals the re-entrant call to early exit.
+ sync_startup_tracker_.reset(new SyncStartupTracker(profile_, this));
service->RequestStart();
// See if it's even possible to bring up the sync engine - if not
@@ -789,9 +791,6 @@ void PeopleHandler::PushSyncPrefs() {
SyncStartupTracker::SYNC_STARTUP_ERROR) {
DisplaySpinner();
}
-
- // Start SyncSetupTracker to wait for sync to initialize.
- sync_startup_tracker_.reset(new SyncStartupTracker(profile_, this));
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698