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

Unified Diff: google_apis/gaia/oauth2_access_token_fetcher_impl_unittest.cc

Issue 1117703002: Adjust URLFetcher::Create API so that object is returned as scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded Pass() calls Created 5 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 | « google_apis/gaia/oauth2_access_token_fetcher_impl.cc ('k') | google_apis/gaia/oauth2_api_call_flow.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/oauth2_access_token_fetcher_impl_unittest.cc
diff --git a/google_apis/gaia/oauth2_access_token_fetcher_impl_unittest.cc b/google_apis/gaia/oauth2_access_token_fetcher_impl_unittest.cc
index 8225d79db1f5a15b4caa2e41f8d1017bbdf77e90..8cd7244c267300357b8e9e0ae9a8427d252ccfb3 100644
--- a/google_apis/gaia/oauth2_access_token_fetcher_impl_unittest.cc
+++ b/google_apis/gaia/oauth2_access_token_fetcher_impl_unittest.cc
@@ -61,11 +61,19 @@ class MockUrlFetcherFactory : public ScopedURLFetcherFactory,
MockUrlFetcherFactory() : ScopedURLFetcherFactory(this) {}
virtual ~MockUrlFetcherFactory() {}
- MOCK_METHOD4(CreateURLFetcher,
+ MOCK_METHOD4(CreateURLFetcherMock,
URLFetcher*(int id,
const GURL& url,
URLFetcher::RequestType request_type,
URLFetcherDelegate* d));
+
+ scoped_ptr<URLFetcher> CreateURLFetcher(int id,
+ const GURL& url,
+ URLFetcher::RequestType request_type,
+ URLFetcherDelegate* d) override {
+ return scoped_ptr<URLFetcher>(
+ CreateURLFetcherMock(id, url, request_type, d));
+ }
};
class MockOAuth2AccessTokenConsumer : public OAuth2AccessTokenConsumer {
@@ -107,7 +115,7 @@ class OAuth2AccessTokenFetcherImplTest : public testing::Test {
if (!body.empty())
url_fetcher->SetResponseString(body);
- EXPECT_CALL(factory_, CreateURLFetcher(_, url, _, _))
+ EXPECT_CALL(factory_, CreateURLFetcherMock(_, url, _, _))
.WillOnce(Return(url_fetcher));
return url_fetcher;
}
« no previous file with comments | « google_apis/gaia/oauth2_access_token_fetcher_impl.cc ('k') | google_apis/gaia/oauth2_api_call_flow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698