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

Unified Diff: google_apis/gaia/oauth2_api_call_flow_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_api_call_flow.cc ('k') | google_apis/gcm/engine/checkin_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/oauth2_api_call_flow_unittest.cc
diff --git a/google_apis/gaia/oauth2_api_call_flow_unittest.cc b/google_apis/gaia/oauth2_api_call_flow_unittest.cc
index d5403277c5fff26824a5b36f62beb95f8aecc37a..1222ae351dbfe5c25797b7c584bc052890bd1ace 100644
--- a/google_apis/gaia/oauth2_api_call_flow_unittest.cc
+++ b/google_apis/gaia/oauth2_api_call_flow_unittest.cc
@@ -61,12 +61,19 @@ class MockUrlFetcherFactory : public ScopedURLFetcherFactory,
}
virtual ~MockUrlFetcherFactory() {}
- MOCK_METHOD4(
- CreateURLFetcher,
- URLFetcher* (int id,
- const GURL& url,
- URLFetcher::RequestType request_type,
- URLFetcherDelegate* d));
+ 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 MockApiCallFlow : public OAuth2ApiCallFlow {
@@ -118,7 +125,7 @@ class OAuth2ApiCallFlowTest : public testing::Test {
EXPECT_CALL(flow_, CreateApiCallUrl()).WillOnce(Return(url));
TestURLFetcher* url_fetcher =
CreateURLFetcher(url, succeeds, status, std::string());
- 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_api_call_flow.cc ('k') | google_apis/gcm/engine/checkin_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698