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

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

Issue 10687002: sync: fix reentrancy crash in ModelAssociationManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reupload Created 8 years, 6 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/fake_data_type_controller.cc
diff --git a/chrome/browser/sync/glue/fake_data_type_controller.cc b/chrome/browser/sync/glue/fake_data_type_controller.cc
index b228c5d74d855659a78965d2b97dbffbd2773042..1aa3cf264937b0cb41bf394c7e8bdd7b944ca7b2 100644
--- a/chrome/browser/sync/glue/fake_data_type_controller.cc
+++ b/chrome/browser/sync/glue/fake_data_type_controller.cc
@@ -74,6 +74,13 @@ void FakeDataTypeController::FinishStart(StartResult result) {
// * -> NOT_RUNNING
void FakeDataTypeController::Stop() {
state_ = NOT_RUNNING;
+ if (!model_load_callback_.is_null()) {
+ // Real data type controllers run the callback and specify "ABORTED" as an
+ // error. We should probably find a way to use the real code an mock out
Nicolas Zea 2012/06/27 17:52:09 an -> and
+ // unnecessary pieces.
+ SimulateModelLoadFinishing();
+ }
+
// The DTM still expects |last_start_callback_| to be called back.
if (!last_start_callback_.is_null()) {
csync::SyncError error(FROM_HERE, "Fake error", type_);

Powered by Google App Engine
This is Rietveld 408576698