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/test/base/chrome_render_view_host_test_harness.h" | 5 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 content::BrowserContext* context) { | 29 content::BrowserContext* context) { |
30 Profile* profile = static_cast<Profile*>(context); | 30 Profile* profile = static_cast<Profile*>(context); |
31 SigninClient* signin_client = | 31 SigninClient* signin_client = |
32 ChromeSigninClientFactory::GetForProfile(profile); | 32 ChromeSigninClientFactory::GetForProfile(profile); |
33 AccountTrackerService* account_tracker_service = | 33 AccountTrackerService* account_tracker_service = |
34 AccountTrackerServiceFactory::GetForProfile(profile); | 34 AccountTrackerServiceFactory::GetForProfile(profile); |
35 #if defined (OS_CHROMEOS) | 35 #if defined (OS_CHROMEOS) |
36 scoped_ptr<SigninManagerBase> signin( | 36 scoped_ptr<SigninManagerBase> signin( |
37 new SigninManagerBase(signin_client, account_tracker_service)); | 37 new SigninManagerBase(signin_client, account_tracker_service)); |
38 signin->Initialize(NULL); | 38 signin->Initialize(NULL); |
39 return signin.Pass(); | 39 return std::move(signin); |
40 #else | 40 #else |
41 scoped_ptr<FakeSigninManager> manager(new FakeSigninManager( | 41 scoped_ptr<FakeSigninManager> manager(new FakeSigninManager( |
42 signin_client, ProfileOAuth2TokenServiceFactory::GetForProfile(profile), | 42 signin_client, ProfileOAuth2TokenServiceFactory::GetForProfile(profile), |
43 account_tracker_service, | 43 account_tracker_service, |
44 GaiaCookieManagerServiceFactory::GetForProfile(profile))); | 44 GaiaCookieManagerServiceFactory::GetForProfile(profile))); |
45 manager->Initialize(g_browser_process->local_state()); | 45 manager->Initialize(g_browser_process->local_state()); |
46 return std::move(manager); | 46 return std::move(manager); |
47 #endif | 47 #endif |
48 } | 48 } |
49 | 49 |
(...skipping 16 matching lines...) Expand all Loading... |
66 #endif | 66 #endif |
67 } | 67 } |
68 | 68 |
69 content::BrowserContext* | 69 content::BrowserContext* |
70 ChromeRenderViewHostTestHarness::CreateBrowserContext() { | 70 ChromeRenderViewHostTestHarness::CreateBrowserContext() { |
71 TestingProfile::Builder builder; | 71 TestingProfile::Builder builder; |
72 builder.AddTestingFactory(SigninManagerFactory::GetInstance(), | 72 builder.AddTestingFactory(SigninManagerFactory::GetInstance(), |
73 BuildSigninManagerFake); | 73 BuildSigninManagerFake); |
74 return builder.Build().release(); | 74 return builder.Build().release(); |
75 } | 75 } |
OLD | NEW |