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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 UserShare* user_share = GetUserShare(); | 138 UserShare* user_share = GetUserShare(); |
139 Directory* directory = user_share->directory.get(); | 139 Directory* directory = user_share->directory.get(); |
140 | 140 |
141 for (int i = syncer::FIRST_REAL_MODEL_TYPE; | 141 for (int i = syncer::FIRST_REAL_MODEL_TYPE; |
142 i < syncer::MODEL_TYPE_COUNT; ++i) { | 142 i < syncer::MODEL_TYPE_COUNT; ++i) { |
143 directory->set_initial_sync_ended_for_type( | 143 directory->set_initial_sync_ended_for_type( |
144 syncer::ModelTypeFromInt(i), true); | 144 syncer::ModelTypeFromInt(i), true); |
145 } | 145 } |
146 } | 146 } |
147 | 147 |
| 148 void SyncBackendHostForProfileSyncTest::EmitOnNotificationsEnabled() { |
| 149 frontend()->OnNotificationsEnabled(); |
| 150 } |
| 151 |
| 152 void SyncBackendHostForProfileSyncTest::EmitOnNotificationsDisabled( |
| 153 syncer::NotificationsDisabledReason reason) { |
| 154 frontend()->OnNotificationsDisabled(reason); |
| 155 } |
| 156 |
| 157 void SyncBackendHostForProfileSyncTest::EmitOnIncomingNotification( |
| 158 const syncer::ObjectIdPayloadMap& id_payloads, |
| 159 const syncer::IncomingNotificationSource source) { |
| 160 frontend()->OnIncomingNotification(id_payloads, source); |
| 161 } |
| 162 |
148 } // namespace browser_sync | 163 } // namespace browser_sync |
149 | 164 |
150 syncer::TestIdFactory* TestProfileSyncService::id_factory() { | 165 syncer::TestIdFactory* TestProfileSyncService::id_factory() { |
151 return &id_factory_; | 166 return &id_factory_; |
152 } | 167 } |
153 | 168 |
154 browser_sync::SyncBackendHostForProfileSyncTest* | 169 browser_sync::SyncBackendHostForProfileSyncTest* |
155 TestProfileSyncService::GetBackendForTest() { | 170 TestProfileSyncService::GetBackendForTest() { |
156 return static_cast<browser_sync::SyncBackendHostForProfileSyncTest*>( | 171 return static_cast<browser_sync::SyncBackendHostForProfileSyncTest*>( |
157 ProfileSyncService::GetBackendForTest()); | 172 ProfileSyncService::GetBackendForTest()); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 profile(), | 240 profile(), |
226 sync_prefs_.AsWeakPtr(), | 241 sync_prefs_.AsWeakPtr(), |
227 invalidator_storage_.AsWeakPtr(), | 242 invalidator_storage_.AsWeakPtr(), |
228 id_factory_, | 243 id_factory_, |
229 callback_, | 244 callback_, |
230 set_initial_sync_ended_on_init_, | 245 set_initial_sync_ended_on_init_, |
231 synchronous_backend_initialization_, | 246 synchronous_backend_initialization_, |
232 fail_initial_download_, | 247 fail_initial_download_, |
233 use_real_database_)); | 248 use_real_database_)); |
234 } | 249 } |
OLD | NEW |