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

Unified Diff: chrome/browser/sync/backend_migrator_unittest.cc

Issue 7453014: [Sync] Refactor sync datatype error handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/backend_migrator_unittest.cc
diff --git a/chrome/browser/sync/backend_migrator_unittest.cc b/chrome/browser/sync/backend_migrator_unittest.cc
index cdc264370e3245f164770a153010d8402d66725c..bd9677bed82595e66b1f03fd27e3f42cc3579291 100644
--- a/chrome/browser/sync/backend_migrator_unittest.cc
+++ b/chrome/browser/sync/backend_migrator_unittest.cc
@@ -59,15 +59,25 @@ class BackendMigratorTest : public testing::Test {
.WillOnce(Return(snap_.get()));
}
- void SendConfigureDone(DataTypeManager::ConfigureResult result,
+ void SendConfigureDone(DataTypeManager::ConfigureStatus status,
const syncable::ModelTypeSet& types) {
- DataTypeManager::ConfigureResultWithErrorLocation result_with_location(
- result, FROM_HERE, types);
- NotificationService::current()->Notify(
- chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
- Source<DataTypeManager>(&manager_),
- Details<DataTypeManager::ConfigureResultWithErrorLocation>(
- &result_with_location));
+ if (status == DataTypeManager::OK) {
+ DataTypeManager::ConfigureResult result(status, types);
+ NotificationService::current()->Notify(
+ chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
+ Source<DataTypeManager>(&manager_),
+ Details<const DataTypeManager::ConfigureResult>(&result));
+ } else {
+ DataTypeManager::ConfigureResult result(
+ status,
+ types,
+ syncable::ModelTypeSet(),
+ FROM_HERE);
+ NotificationService::current()->Notify(
+ chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
+ Source<DataTypeManager>(&manager_),
+ Details<const DataTypeManager::ConfigureResult>(&result));
+ }
}
ProfileSyncService* service() { return &service_; }

Powered by Google App Engine
This is Rietveld 408576698