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

Side by Side Diff: components/sync/driver/model_association_manager.cc

Issue 2289143003: [Sync] Convert DTCs to be not RefCounted and NonThreadSafe. (Closed)
Patch Set: Rebase. Created 4 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/sync/driver/model_association_manager.h" 5 #include "components/sync/driver/model_association_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 configure_status_ = DataTypeManager::ABORTED; 255 configure_status_ = DataTypeManager::ABORTED;
256 DVLOG(1) << "ModelAssociationManager: Calling OnModelAssociationDone"; 256 DVLOG(1) << "ModelAssociationManager: Calling OnModelAssociationDone";
257 ModelAssociationDone(IDLE); 257 ModelAssociationDone(IDLE);
258 } else { 258 } else {
259 DCHECK(associating_types_.Empty()); 259 DCHECK(associating_types_.Empty());
260 DCHECK(requested_types_.Empty()); 260 DCHECK(requested_types_.Empty());
261 state_ = IDLE; 261 state_ = IDLE;
262 } 262 }
263 } 263 }
264 264
265 void ModelAssociationManager::ModelLoadCallback(syncer::ModelType type, 265 void ModelAssociationManager::ModelLoadCallback(
266 syncer::SyncError error) { 266 syncer::ModelType type,
267 const syncer::SyncError& error) {
267 DVLOG(1) << "ModelAssociationManager: ModelLoadCallback for " 268 DVLOG(1) << "ModelAssociationManager: ModelLoadCallback for "
268 << syncer::ModelTypeToString(type); 269 << syncer::ModelTypeToString(type);
269 270
270 if (error.IsSet()) { 271 if (error.IsSet()) {
271 syncer::SyncMergeResult local_merge_result(type); 272 syncer::SyncMergeResult local_merge_result(type);
272 local_merge_result.set_error(error); 273 local_merge_result.set_error(error);
273 TypeStartCallback(type, base::TimeTicks::Now(), 274 TypeStartCallback(type, base::TimeTicks::Now(),
274 DataTypeController::ASSOCIATION_FAILED, 275 DataTypeController::ASSOCIATION_FAILED,
275 local_merge_result, syncer::SyncMergeResult(type)); 276 local_merge_result, syncer::SyncMergeResult(type));
276 return; 277 return;
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 // At least one type is not ready. 418 // At least one type is not ready.
418 return; 419 return;
419 } 420 }
420 } 421 }
421 422
422 notified_about_ready_for_configure_ = true; 423 notified_about_ready_for_configure_ = true;
423 delegate_->OnAllDataTypesReadyForConfigure(); 424 delegate_->OnAllDataTypesReadyForConfigure();
424 } 425 }
425 426
426 } // namespace sync_driver 427 } // namespace sync_driver
OLDNEW
« no previous file with comments | « components/sync/driver/model_association_manager.h ('k') | components/sync/driver/model_association_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698