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

Side by Side Diff: chrome/test/testing_profile.cc

Issue 3305003: New authorization framework for sync. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/test/testing_profile.h" 5 #include "chrome/test/testing_profile.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 } 446 }
447 447
448 TokenService* TestingProfile::GetTokenService() { 448 TokenService* TestingProfile::GetTokenService() {
449 if (!token_service_.get()) { 449 if (!token_service_.get()) {
450 token_service_.reset(new TokenService()); 450 token_service_.reset(new TokenService());
451 } 451 }
452 return token_service_.get(); 452 return token_service_.get();
453 } 453 }
454 454
455 ProfileSyncService* TestingProfile::GetProfileSyncService() { 455 ProfileSyncService* TestingProfile::GetProfileSyncService() {
456 return GetProfileSyncService("");
457 }
458
459 ProfileSyncService* TestingProfile::GetProfileSyncService(
460 const std::string& cros_user) {
456 if (!profile_sync_service_.get()) { 461 if (!profile_sync_service_.get()) {
457 // Use a NiceMock here since we are really using the mock as a 462 // Use a NiceMock here since we are really using the mock as a
458 // fake. Test cases that want to set expectations on a 463 // fake. Test cases that want to set expectations on a
459 // ProfileSyncService should use the ProfileMock and have this 464 // ProfileSyncService should use the ProfileMock and have this
460 // method return their own mock instance. 465 // method return their own mock instance.
461 profile_sync_service_.reset(new NiceMock<ProfileSyncServiceMock>()); 466 profile_sync_service_.reset(new NiceMock<ProfileSyncServiceMock>());
462 } 467 }
463 return profile_sync_service_.get(); 468 return profile_sync_service_.get();
464 } 469 }
465 470
466 void TestingProfile::DestroyWebDataService() { 471 void TestingProfile::DestroyWebDataService() {
467 if (!web_data_service_.get()) 472 if (!web_data_service_.get())
468 return; 473 return;
469 474
470 web_data_service_->Shutdown(); 475 web_data_service_->Shutdown();
471 } 476 }
OLDNEW
« chrome/browser/sync/token_migrator.h ('K') | « chrome/test/testing_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698