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

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

Issue 6902101: Refactor sync passphrase setup flow and fix passphrase tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: de Morgan's law simplification. Created 9 years, 7 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) 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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698