| OLD | NEW |
| 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/engine/syncapi.h" | 8 #include "chrome/browser/sync/engine/syncapi.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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 // A side effect of adding the NIGORI mode (normally done by the syncer) | 220 // A side effect of adding the NIGORI mode (normally done by the syncer) |
| 221 // is a decryption attempt, which will fail the first time. | 221 // is a decryption attempt, which will fail the first time. |
| 222 send_passphrase_required = true; | 222 send_passphrase_required = true; |
| 223 } | 223 } |
| 224 | 224 |
| 225 SetInitialSyncEndedForEnabledTypes(); | 225 SetInitialSyncEndedForEnabledTypes(); |
| 226 } | 226 } |
| 227 | 227 |
| 228 ProfileSyncService::OnBackendInitialized(); | 228 ProfileSyncService::OnBackendInitialized(); |
| 229 if (send_passphrase_required) | 229 if (send_passphrase_required) |
| 230 OnPassphraseRequired(true); | 230 OnPassphraseRequired(sync_api::REASON_DECRYPTION); |
| 231 | 231 |
| 232 // TODO(akalin): Figure out a better way to do this. | 232 // TODO(akalin): Figure out a better way to do this. |
| 233 if (synchronous_backend_initialization_) { | 233 if (synchronous_backend_initialization_) { |
| 234 MessageLoop::current()->Quit(); | 234 MessageLoop::current()->Quit(); |
| 235 } | 235 } |
| 236 } | 236 } |
| 237 | 237 |
| 238 void TestProfileSyncService::Observe(NotificationType type, | 238 void TestProfileSyncService::Observe(NotificationType type, |
| 239 const NotificationSource& source, | 239 const NotificationSource& source, |
| 240 const NotificationDetails& details) { | 240 const NotificationDetails& details) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 255 void TestProfileSyncService::CreateBackend() { | 255 void TestProfileSyncService::CreateBackend() { |
| 256 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest( | 256 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest( |
| 257 profile(), | 257 profile(), |
| 258 set_initial_sync_ended_on_init_, | 258 set_initial_sync_ended_on_init_, |
| 259 synchronous_backend_initialization_)); | 259 synchronous_backend_initialization_)); |
| 260 } | 260 } |
| 261 | 261 |
| 262 std::string TestProfileSyncService::GetLsidForAuthBootstraping() { | 262 std::string TestProfileSyncService::GetLsidForAuthBootstraping() { |
| 263 return "foo"; | 263 return "foo"; |
| 264 } | 264 } |
| OLD | NEW |