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