| 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/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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 UserShare* user_share = GetUserShare(); | 139 UserShare* user_share = GetUserShare(); |
| 140 Directory* directory = user_share->directory.get(); | 140 Directory* directory = user_share->directory.get(); |
| 141 | 141 |
| 142 for (int i = syncer::FIRST_REAL_MODEL_TYPE; | 142 for (int i = syncer::FIRST_REAL_MODEL_TYPE; |
| 143 i < syncer::MODEL_TYPE_COUNT; ++i) { | 143 i < syncer::MODEL_TYPE_COUNT; ++i) { |
| 144 directory->set_initial_sync_ended_for_type( | 144 directory->set_initial_sync_ended_for_type( |
| 145 syncer::ModelTypeFromInt(i), true); | 145 syncer::ModelTypeFromInt(i), true); |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 | 148 |
| 149 void SyncBackendHostForProfileSyncTest::EmitOnNotificationsEnabled() { | 149 void SyncBackendHostForProfileSyncTest::EmitOnInvalidatorStateChange( |
| 150 frontend()->OnNotificationsEnabled(); | 150 syncer::InvalidatorState state) { |
| 151 frontend()->OnInvalidatorStateChange(state); |
| 151 } | 152 } |
| 152 | 153 |
| 153 void SyncBackendHostForProfileSyncTest::EmitOnNotificationsDisabled( | 154 void SyncBackendHostForProfileSyncTest::EmitOnIncomingInvalidation( |
| 154 syncer::NotificationsDisabledReason reason) { | |
| 155 frontend()->OnNotificationsDisabled(reason); | |
| 156 } | |
| 157 | |
| 158 void SyncBackendHostForProfileSyncTest::EmitOnIncomingNotification( | |
| 159 const syncer::ObjectIdStateMap& id_state_map, | 155 const syncer::ObjectIdStateMap& id_state_map, |
| 160 const syncer::IncomingNotificationSource source) { | 156 const syncer::IncomingInvalidationSource source) { |
| 161 frontend()->OnIncomingNotification(id_state_map, source); | 157 frontend()->OnIncomingInvalidation(id_state_map, source); |
| 162 } | 158 } |
| 163 | 159 |
| 164 } // namespace browser_sync | 160 } // namespace browser_sync |
| 165 | 161 |
| 166 syncer::TestIdFactory* TestProfileSyncService::id_factory() { | 162 syncer::TestIdFactory* TestProfileSyncService::id_factory() { |
| 167 return &id_factory_; | 163 return &id_factory_; |
| 168 } | 164 } |
| 169 | 165 |
| 170 browser_sync::SyncBackendHostForProfileSyncTest* | 166 browser_sync::SyncBackendHostForProfileSyncTest* |
| 171 TestProfileSyncService::GetBackendForTest() { | 167 TestProfileSyncService::GetBackendForTest() { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 profile(), | 234 profile(), |
| 239 sync_prefs_.AsWeakPtr(), | 235 sync_prefs_.AsWeakPtr(), |
| 240 invalidator_storage_.AsWeakPtr(), | 236 invalidator_storage_.AsWeakPtr(), |
| 241 id_factory_, | 237 id_factory_, |
| 242 callback_, | 238 callback_, |
| 243 set_initial_sync_ended_on_init_, | 239 set_initial_sync_ended_on_init_, |
| 244 synchronous_backend_initialization_, | 240 synchronous_backend_initialization_, |
| 245 fail_initial_download_, | 241 fail_initial_download_, |
| 246 storage_option_)); | 242 storage_option_)); |
| 247 } | 243 } |
| OLD | NEW |