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

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

Issue 9702083: sync: Count and report reflected updates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update python test server Created 8 years, 9 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/test_profile_sync_service.h" 5 #include "chrome/browser/sync/test_profile_sync_service.h"
6 6
7 #include "chrome/browser/signin/signin_manager.h" 7 #include "chrome/browser/signin/signin_manager.h"
8 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" 8 #include "chrome/browser/sync/abstract_profile_sync_service_test.h"
9 #include "chrome/browser/sync/glue/data_type_controller.h" 9 #include "chrome/browser/sync/glue/data_type_controller.h"
10 #include "chrome/browser/sync/glue/sync_backend_host.h" 10 #include "chrome/browser/sync/glue/sync_backend_host.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 void SyncBackendHostForProfileSyncTest:: 46 void SyncBackendHostForProfileSyncTest::
47 SimulateSyncCycleCompletedInitialSyncEnded( 47 SimulateSyncCycleCompletedInitialSyncEnded(
48 const tracked_objects::Location& location) { 48 const tracked_objects::Location& location) {
49 syncable::ModelTypeSet sync_ended; 49 syncable::ModelTypeSet sync_ended;
50 if (!fail_initial_download_) 50 if (!fail_initial_download_)
51 sync_ended = syncable::ModelTypeSet::All(); 51 sync_ended = syncable::ModelTypeSet::All();
52 std::string download_progress_markers[syncable::MODEL_TYPE_COUNT]; 52 std::string download_progress_markers[syncable::MODEL_TYPE_COUNT];
53 HandleSyncCycleCompletedOnFrontendLoop(new SyncSessionSnapshot( 53 HandleSyncCycleCompletedOnFrontendLoop(new SyncSessionSnapshot(
54 SyncerStatus(), ErrorCounters(), 0, false, 54 SyncerStatus(), ErrorCounters(), 0, false,
55 sync_ended, download_progress_markers, false, false, 0, 0, 0, 0, 0, 55 sync_ended, download_progress_markers, false, false, 0, 0, 0, 0, 0,
56 false, SyncSourceInfo(), 0, base::Time::Now(), false)); 56 false, SyncSourceInfo(), false, 0, base::Time::Now(), false));
57 } 57 }
58 58
59 namespace { 59 namespace {
60 60
61 sync_api::HttpPostProviderFactory* MakeTestHttpBridgeFactory() { 61 sync_api::HttpPostProviderFactory* MakeTestHttpBridgeFactory() {
62 return new browser_sync::TestHttpBridgeFactory(); 62 return new browser_sync::TestHttpBridgeFactory();
63 } 63 }
64 64
65 } // namespace 65 } // namespace
66 66
(...skipping 22 matching lines...) Expand all
89 SyncBackendHost::FinishConfigureDataTypesOnFrontendLoop(); 89 SyncBackendHost::FinishConfigureDataTypesOnFrontendLoop();
90 if (IsDownloadingNigoriForTest()) { 90 if (IsDownloadingNigoriForTest()) {
91 syncable::ModelTypeSet sync_ended; 91 syncable::ModelTypeSet sync_ended;
92 92
93 if (!fail_initial_download_) 93 if (!fail_initial_download_)
94 sync_ended.Put(syncable::NIGORI); 94 sync_ended.Put(syncable::NIGORI);
95 std::string download_progress_markers[syncable::MODEL_TYPE_COUNT]; 95 std::string download_progress_markers[syncable::MODEL_TYPE_COUNT];
96 HandleSyncCycleCompletedOnFrontendLoop(new SyncSessionSnapshot( 96 HandleSyncCycleCompletedOnFrontendLoop(new SyncSessionSnapshot(
97 SyncerStatus(), ErrorCounters(), 0, false, 97 SyncerStatus(), ErrorCounters(), 0, false,
98 sync_ended, download_progress_markers, false, false, 0, 0, 0, 0, 0, 98 sync_ended, download_progress_markers, false, false, 0, 0, 0, 0, 0,
99 false, SyncSourceInfo(), 0, base::Time::Now(), false)); 99 false, SyncSourceInfo(), false, 0, base::Time::Now(), false));
100 } 100 }
101 } 101 }
102 102
103 void SyncBackendHostForProfileSyncTest::SetHistoryServiceExpectations( 103 void SyncBackendHostForProfileSyncTest::SetHistoryServiceExpectations(
104 ProfileMock* profile) { 104 ProfileMock* profile) {
105 EXPECT_CALL(*profile, GetHistoryService(testing::_)). 105 EXPECT_CALL(*profile, GetHistoryService(testing::_)).
106 WillOnce(testing::Return((HistoryService*)NULL)); 106 WillOnce(testing::Return((HistoryService*)NULL));
107 } 107 }
108 108
109 } // namespace browser_sync 109 } // namespace browser_sync
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 void TestProfileSyncService::CreateBackend() { 224 void TestProfileSyncService::CreateBackend() {
225 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest( 225 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest(
226 profile(), 226 profile(),
227 sync_prefs_.AsWeakPtr(), 227 sync_prefs_.AsWeakPtr(),
228 set_initial_sync_ended_on_init_, 228 set_initial_sync_ended_on_init_,
229 synchronous_backend_initialization_, 229 synchronous_backend_initialization_,
230 fail_initial_download_, 230 fail_initial_download_,
231 use_real_database_)); 231 use_real_database_));
232 } 232 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698