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

Unified Diff: components/signin/core/browser/test_signin_client.cc

Issue 234573003: Upstream PO2TS_IOS unit test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 6 years, 8 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 | « components/signin/core/browser/test_signin_client.h ('k') | components/signin/ios/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/signin/core/browser/test_signin_client.cc
diff --git a/components/signin/core/browser/test_signin_client.cc b/components/signin/core/browser/test_signin_client.cc
index af05dd1ec05c9c96a1850a060cad0a6d23408da5..e197354138296c3d65d786b483a033536afd3728 100644
--- a/components/signin/core/browser/test_signin_client.cc
+++ b/components/signin/core/browser/test_signin_client.cc
@@ -9,6 +9,10 @@
#include "components/webdata/common/web_database_service.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if defined(OS_IOS)
+#include "ios/public/test/fake_profile_oauth2_token_service_ios_provider.h"
+#endif
+
TestSigninClient::TestSigninClient()
: request_context_(new net::TestURLRequestContextGetter(
base::MessageLoopProxy::current())) {
@@ -56,8 +60,14 @@ void TestSigninClient::SetCookieChangedCallback(
#if defined(OS_IOS)
ios::ProfileOAuth2TokenServiceIOSProvider* TestSigninClient::GetIOSProvider() {
- // Just returns NULL for now. It should be changed to return an
- // |ios::FakeProfileOAuth2TokenServiceIOSProvider|.
- return NULL;
+ return GetIOSProviderAsFake();
+}
+
+ios::FakeProfileOAuth2TokenServiceIOSProvider*
+TestSigninClient::GetIOSProviderAsFake() {
+ if (!iosProvider_) {
+ iosProvider_.reset(new ios::FakeProfileOAuth2TokenServiceIOSProvider());
+ }
+ return iosProvider_.get();
}
#endif
« no previous file with comments | « components/signin/core/browser/test_signin_client.h ('k') | components/signin/ios/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698