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

Unified Diff: chrome/test/base/chrome_render_view_host_test_harness.cc

Issue 1257623002: Componentize FakeSigninManager and SigninManager prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | components/signin.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/chrome_render_view_host_test_harness.cc
diff --git a/chrome/test/base/chrome_render_view_host_test_harness.cc b/chrome/test/base/chrome_render_view_host_test_harness.cc
index 098403e2a0ae9c2b6f4f8aa5428ec496718db845..3aa71333fe3048bccba92d9835eccfd84c1654d3 100644
--- a/chrome/test/base/chrome_render_view_host_test_harness.cc
+++ b/chrome/test/base/chrome_render_view_host_test_harness.cc
@@ -2,13 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/signin/account_tracker_service_factory.h"
#include "chrome/browser/signin/chrome_signin_client_factory.h"
-#include "chrome/browser/signin/fake_signin_manager.h"
+#include "chrome/browser/signin/gaia_cookie_manager_service_factory.h"
+#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
+#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
+#include "components/signin/core/browser/fake_signin_manager.h"
#if defined(USE_ASH)
#include "ash/shell.h"
@@ -27,14 +29,20 @@ namespace {
scoped_ptr<KeyedService> BuildSigninManagerFake(
content::BrowserContext* context) {
Profile* profile = static_cast<Profile*>(context);
+ SigninClient* signin_client =
+ ChromeSigninClientFactory::GetForProfile(profile);
+ AccountTrackerService* account_tracker_service =
+ AccountTrackerServiceFactory::GetForProfile(profile);
#if defined (OS_CHROMEOS)
- scoped_ptr<SigninManagerBase> signin(new SigninManagerBase(
- ChromeSigninClientFactory::GetInstance()->GetForProfile(profile),
- AccountTrackerServiceFactory::GetInstance()->GetForProfile(profile)));
+ scoped_ptr<SigninManagerBase> signin(
+ new SigninManagerBase(signin_client, account_tracker_service));
signin->Initialize(NULL);
return signin.Pass();
#else
- scoped_ptr<FakeSigninManager> manager(new FakeSigninManager(profile));
+ scoped_ptr<FakeSigninManager> manager(new FakeSigninManager(
+ signin_client, ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
+ account_tracker_service,
+ GaiaCookieManagerServiceFactory::GetForProfile(profile)));
manager->Initialize(g_browser_process->local_state());
return manager.Pass();
#endif
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | components/signin.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698