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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 10780002: Revert "Revert 146262 - Revert "Revert 142517 - [Sync] Refactor sync configuration logic."" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Diff off revert Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "chrome/browser/sync/glue/sync_backend_host.h" 7 #include "chrome/browser/sync/glue/sync_backend_host.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 initialization_state_ = NOT_INITIALIZED; 1155 initialization_state_ = NOT_INITIALIZED;
1156 1156
1157 DCHECK_EQ(MessageLoop::current(), frontend_loop_); 1157 DCHECK_EQ(MessageLoop::current(), frontend_loop_);
1158 if (!success) { 1158 if (!success) {
1159 initialization_state_ = NOT_INITIALIZED; 1159 initialization_state_ = NOT_INITIALIZED;
1160 frontend_->OnBackendInitialized( 1160 frontend_->OnBackendInitialized(
1161 syncer::WeakHandle<syncer::JsBackend>(), false); 1161 syncer::WeakHandle<syncer::JsBackend>(), false);
1162 return; 1162 return;
1163 } 1163 }
1164 1164
1165 if (sync_prefs_->HasSyncSetupCompleted() &&
1166 initialization_state_ < DOWNLOADING_NIGORI) {
1167 initialization_state_ = DOWNLOADING_NIGORI;
1168 }
1169
1165 // Run initialization state machine. 1170 // Run initialization state machine.
1166 switch (initialization_state_) { 1171 switch (initialization_state_) {
1167 case NOT_INITIALIZED: 1172 case NOT_INITIALIZED:
1168 initialization_state_ = DOWNLOADING_NIGORI; 1173 initialization_state_ = DOWNLOADING_NIGORI;
1169 ConfigureDataTypes( 1174 ConfigureDataTypes(
1170 syncer::CONFIGURE_REASON_NEW_CLIENT, 1175 syncer::CONFIGURE_REASON_NEW_CLIENT,
1171 syncer::ModelTypeSet(), 1176 syncer::ModelTypeSet(),
1172 syncer::ModelTypeSet(), 1177 syncer::ModelTypeSet(),
1173 WITH_NIGORI, 1178 WITH_NIGORI,
1174 // Calls back into this function. 1179 // Calls back into this function.
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 FROM_HERE, 1358 FROM_HERE,
1354 base::Bind(&SyncBackendHost::Core::DoRefreshNigori, 1359 base::Bind(&SyncBackendHost::Core::DoRefreshNigori,
1355 core_.get(), sync_thread_done_callback)); 1360 core_.get(), sync_thread_done_callback));
1356 } 1361 }
1357 1362
1358 #undef SDVLOG 1363 #undef SDVLOG
1359 1364
1360 #undef SLOG 1365 #undef SLOG
1361 1366
1362 } // namespace browser_sync 1367 } // namespace browser_sync
OLDNEW
« 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