OLD | NEW |
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 "chrome/browser/sync/backend_migrator.h" | 5 #include "chrome/browser/sync/backend_migrator.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/tracked_objects.h" | 9 #include "base/tracked_objects.h" |
10 #include "chrome/browser/sync/profile_sync_service.h" | 10 #include "chrome/browser/sync/profile_sync_service.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 } | 108 } |
109 | 109 |
110 void BackendMigrator::OnConfigureDone( | 110 void BackendMigrator::OnConfigureDone( |
111 const DataTypeManager::ConfigureResult& result) { | 111 const DataTypeManager::ConfigureResult& result) { |
112 if (state_ == IDLE) | 112 if (state_ == IDLE) |
113 return; | 113 return; |
114 | 114 |
115 // |manager_|'s methods aren't re-entrant, and we're notified from | 115 // |manager_|'s methods aren't re-entrant, and we're notified from |
116 // them, so post a task to avoid problems. | 116 // them, so post a task to avoid problems. |
117 SDVLOG(1) << "Posting OnConfigureDoneImpl"; | 117 SDVLOG(1) << "Posting OnConfigureDoneImpl"; |
118 MessageLoop::current()->PostTask( | 118 base::MessageLoop::current()->PostTask( |
119 FROM_HERE, | 119 FROM_HERE, |
120 base::Bind(&BackendMigrator::OnConfigureDoneImpl, | 120 base::Bind(&BackendMigrator::OnConfigureDoneImpl, |
121 weak_ptr_factory_.GetWeakPtr(), result)); | 121 weak_ptr_factory_.GetWeakPtr(), result)); |
122 } | 122 } |
123 | 123 |
124 namespace { | 124 namespace { |
125 | 125 |
126 syncer::ModelTypeSet GetUnsyncedDataTypes(syncer::UserShare* user_share) { | 126 syncer::ModelTypeSet GetUnsyncedDataTypes(syncer::UserShare* user_share) { |
127 syncer::ReadTransaction trans(FROM_HERE, user_share); | 127 syncer::ReadTransaction trans(FROM_HERE, user_share); |
128 syncer::ModelTypeSet unsynced_data_types; | 128 syncer::ModelTypeSet unsynced_data_types; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 | 216 |
217 syncer::ModelTypeSet BackendMigrator::GetPendingMigrationTypesForTest() const { | 217 syncer::ModelTypeSet BackendMigrator::GetPendingMigrationTypesForTest() const { |
218 return to_migrate_; | 218 return to_migrate_; |
219 } | 219 } |
220 | 220 |
221 #undef SDVLOG | 221 #undef SDVLOG |
222 | 222 |
223 #undef SLOG | 223 #undef SLOG |
224 | 224 |
225 }; // namespace browser_sync | 225 }; // namespace browser_sync |
OLD | NEW |