OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/signin/fake_gaia_cookie_manager_service.h" | 5 #include "chrome/browser/signin/fake_gaia_cookie_manager_service.h" |
6 | 6 |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/signin/chrome_signin_client_factory.h" | 9 #include "chrome/browser/signin/chrome_signin_client_factory.h" |
10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 base::StringPrintf( | 104 base::StringPrintf( |
105 "[\"f\", [[\"b\", 0, \"n\", \"%s\", \"p\", 0, 0, 0, 0, %d, \"28\"], " | 105 "[\"f\", [[\"b\", 0, \"n\", \"%s\", \"p\", 0, 0, 0, 0, %d, \"28\"], " |
106 "[\"b\", 0, \"n\", \"%s\", \"p\", 0, 0, 0, 0, %d, \"29\"]]]", | 106 "[\"b\", 0, \"n\", \"%s\", \"p\", 0, 0, 0, 0, %d, \"29\"]]]", |
107 account1, account1_expired ? 0 : 1, | 107 account1, account1_expired ? 0 : 1, |
108 account2, account2_expired ? 0 : 1), | 108 account2, account2_expired ? 0 : 1), |
109 net::HTTP_OK, | 109 net::HTTP_OK, |
110 net::URLRequestStatus::SUCCESS); | 110 net::URLRequestStatus::SUCCESS); |
111 } | 111 } |
112 | 112 |
113 // static | 113 // static |
114 KeyedService* FakeGaiaCookieManagerService::Build( | 114 scoped_ptr<KeyedService> FakeGaiaCookieManagerService::Build( |
115 content::BrowserContext* context) { | 115 content::BrowserContext* context) { |
116 Profile* profile = Profile::FromBrowserContext(context); | 116 Profile* profile = Profile::FromBrowserContext(context); |
117 FakeGaiaCookieManagerService* service = new FakeGaiaCookieManagerService( | 117 return make_scoped_ptr(new FakeGaiaCookieManagerService( |
118 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), | 118 ProfileOAuth2TokenServiceFactory::GetForProfile(profile), |
119 GaiaConstants::kChromeSource, | 119 GaiaConstants::kChromeSource, |
120 ChromeSigninClientFactory::GetForProfile(profile)); | 120 ChromeSigninClientFactory::GetForProfile(profile))); |
121 return service; | |
122 } | 121 } |
OLD | NEW |