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

Side by Side Diff: chrome/browser/sync/backend_migrator_unittest.cc

Issue 10662035: [Sync] Put everything in sync/api into csync namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments 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 unified diff | Download patch | Annotate | Revision Log
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 "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/tracked_objects.h" 8 #include "base/tracked_objects.h"
9 #include "chrome/browser/sync/glue/data_type_manager_mock.h" 9 #include "chrome/browser/sync/glue/data_type_manager_mock.h"
10 #include "chrome/browser/sync/profile_sync_service_mock.h" 10 #include "chrome/browser/sync/profile_sync_service_mock.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 trans.GetDirectory()->SetDownloadProgress(type, progress_marker); 70 trans.GetDirectory()->SetDownloadProgress(type, progress_marker);
71 } 71 }
72 } 72 }
73 73
74 void SendConfigureDone(DataTypeManager::ConfigureStatus status, 74 void SendConfigureDone(DataTypeManager::ConfigureStatus status,
75 syncable::ModelTypeSet requested_types) { 75 syncable::ModelTypeSet requested_types) {
76 if (status == DataTypeManager::OK) { 76 if (status == DataTypeManager::OK) {
77 DataTypeManager::ConfigureResult result(status, requested_types); 77 DataTypeManager::ConfigureResult result(status, requested_types);
78 migrator_->OnConfigureDone(result); 78 migrator_->OnConfigureDone(result);
79 } else { 79 } else {
80 std::list<SyncError> errors; 80 std::list<csync::SyncError> errors;
81 DataTypeManager::ConfigureResult result( 81 DataTypeManager::ConfigureResult result(
82 status, 82 status,
83 requested_types, 83 requested_types,
84 errors, 84 errors,
85 syncable::ModelTypeSet()); 85 syncable::ModelTypeSet());
86 migrator_->OnConfigureDone(result); 86 migrator_->OnConfigureDone(result);
87 } 87 }
88 message_loop_.RunAllPending(); 88 message_loop_.RunAllPending();
89 } 89 }
90 90
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 .WillOnce(Return(DataTypeManager::CONFIGURED)); 313 .WillOnce(Return(DataTypeManager::CONFIGURED));
314 EXPECT_CALL(*manager(), Configure(_, csync::CONFIGURE_REASON_MIGRATION)) 314 EXPECT_CALL(*manager(), Configure(_, csync::CONFIGURE_REASON_MIGRATION))
315 .Times(1); 315 .Times(1);
316 migrator()->MigrateTypes(to_migrate); 316 migrator()->MigrateTypes(to_migrate);
317 SetUnsyncedTypes(syncable::ModelTypeSet()); 317 SetUnsyncedTypes(syncable::ModelTypeSet());
318 SendConfigureDone(DataTypeManager::ABORTED, syncable::ModelTypeSet()); 318 SendConfigureDone(DataTypeManager::ABORTED, syncable::ModelTypeSet());
319 EXPECT_EQ(BackendMigrator::IDLE, migrator()->state()); 319 EXPECT_EQ(BackendMigrator::IDLE, migrator()->state());
320 } 320 }
321 321
322 }; // namespace browser_sync 322 }; // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_service_sync_unittest.cc ('k') | chrome/browser/sync/failed_datatypes_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698