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

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

Issue 8919021: [Sync] Rename ModelEnumSet to ModelTypeSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/test_profile_sync_service.h" 5 #include "chrome/browser/sync/test_profile_sync_service.h"
6 6
7 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" 7 #include "chrome/browser/sync/abstract_profile_sync_service_test.h"
8 #include "chrome/browser/sync/glue/data_type_controller.h" 8 #include "chrome/browser/sync/glue/data_type_controller.h"
9 #include "chrome/browser/sync/glue/sync_backend_host.h" 9 #include "chrome/browser/sync/glue/sync_backend_host.h"
10 #include "chrome/browser/sync/internal_api/user_share.h" 10 #include "chrome/browser/sync/internal_api/user_share.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 : browser_sync::SyncBackendHost( 55 : browser_sync::SyncBackendHost(
56 profile->GetDebugName(), profile, sync_prefs), 56 profile->GetDebugName(), profile, sync_prefs),
57 synchronous_init_(synchronous_init), 57 synchronous_init_(synchronous_init),
58 fail_initial_download_(fail_initial_download) {} 58 fail_initial_download_(fail_initial_download) {}
59 59
60 SyncBackendHostForProfileSyncTest::~SyncBackendHostForProfileSyncTest() {} 60 SyncBackendHostForProfileSyncTest::~SyncBackendHostForProfileSyncTest() {}
61 61
62 void SyncBackendHostForProfileSyncTest:: 62 void SyncBackendHostForProfileSyncTest::
63 SimulateSyncCycleCompletedInitialSyncEnded( 63 SimulateSyncCycleCompletedInitialSyncEnded(
64 const tracked_objects::Location& location) { 64 const tracked_objects::Location& location) {
65 syncable::ModelEnumSet sync_ended; 65 syncable::ModelTypeSet sync_ended;
66 if (!fail_initial_download_) 66 if (!fail_initial_download_)
67 sync_ended = syncable::ModelEnumSet::All(); 67 sync_ended = syncable::ModelTypeSet::All();
68 std::string download_progress_markers[syncable::MODEL_TYPE_COUNT]; 68 std::string download_progress_markers[syncable::MODEL_TYPE_COUNT];
69 core_->HandleSyncCycleCompletedOnFrontendLoop(new SyncSessionSnapshot( 69 core_->HandleSyncCycleCompletedOnFrontendLoop(new SyncSessionSnapshot(
70 SyncerStatus(), ErrorCounters(), 0, false, 70 SyncerStatus(), ErrorCounters(), 0, false,
71 sync_ended, download_progress_markers, false, false, 0, 0, 0, false, 71 sync_ended, download_progress_markers, false, false, 0, 0, 0, false,
72 SyncSourceInfo(), 0, base::Time::Now())); 72 SyncSourceInfo(), 0, base::Time::Now()));
73 } 73 }
74 74
75 sync_api::HttpPostProviderFactory* 75 sync_api::HttpPostProviderFactory*
76 SyncBackendHostForProfileSyncTest::MakeHttpBridgeFactory( 76 SyncBackendHostForProfileSyncTest::MakeHttpBridgeFactory(
77 const scoped_refptr<net::URLRequestContextGetter>& getter) { 77 const scoped_refptr<net::URLRequestContextGetter>& getter) {
(...skipping 13 matching lines...) Expand all
91 // The SyncBackend posts a task to the current loop when 91 // The SyncBackend posts a task to the current loop when
92 // initialization completes. 92 // initialization completes.
93 MessageLoop::current()->Run(); 93 MessageLoop::current()->Run();
94 } 94 }
95 } 95 }
96 96
97 void SyncBackendHostForProfileSyncTest::StartConfiguration( 97 void SyncBackendHostForProfileSyncTest::StartConfiguration(
98 const base::Closure& callback) { 98 const base::Closure& callback) {
99 SyncBackendHost::FinishConfigureDataTypesOnFrontendLoop(); 99 SyncBackendHost::FinishConfigureDataTypesOnFrontendLoop();
100 if (initialization_state_ == DOWNLOADING_NIGORI) { 100 if (initialization_state_ == DOWNLOADING_NIGORI) {
101 syncable::ModelEnumSet sync_ended; 101 syncable::ModelTypeSet sync_ended;
102 102
103 if (!fail_initial_download_) 103 if (!fail_initial_download_)
104 sync_ended.Put(syncable::NIGORI); 104 sync_ended.Put(syncable::NIGORI);
105 std::string download_progress_markers[syncable::MODEL_TYPE_COUNT]; 105 std::string download_progress_markers[syncable::MODEL_TYPE_COUNT];
106 core_->HandleSyncCycleCompletedOnFrontendLoop(new SyncSessionSnapshot( 106 core_->HandleSyncCycleCompletedOnFrontendLoop(new SyncSessionSnapshot(
107 SyncerStatus(), ErrorCounters(), 0, false, 107 SyncerStatus(), ErrorCounters(), 0, false,
108 sync_ended, download_progress_markers, false, false, 0, 0, 0, false, 108 sync_ended, download_progress_markers, false, false, 0, 0, 0, false,
109 SyncSourceInfo(), 0, base::Time::Now())); 109 SyncSourceInfo(), 0, base::Time::Now()));
110 } 110 }
111 } 111 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 238 }
239 239
240 void TestProfileSyncService::CreateBackend() { 240 void TestProfileSyncService::CreateBackend() {
241 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest( 241 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest(
242 profile(), 242 profile(),
243 sync_prefs_.AsWeakPtr(), 243 sync_prefs_.AsWeakPtr(),
244 set_initial_sync_ended_on_init_, 244 set_initial_sync_ended_on_init_,
245 synchronous_backend_initialization_, 245 synchronous_backend_initialization_,
246 fail_initial_download_)); 246 fail_initial_download_));
247 } 247 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/null_directory_change_delegate.cc ('k') | chrome/browser/sync/tools/sync_listen_notifications.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698