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

Unified Diff: google_apis/gaia/gaia_oauth_client_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/gaia_oauth_client.cc ('k') | google_apis/gaia/mock_url_fetcher_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/gaia_oauth_client_unittest.cc
diff --git a/google_apis/gaia/gaia_oauth_client_unittest.cc b/google_apis/gaia/gaia_oauth_client_unittest.cc
index 56fdc9167819935a19e53011d99b0d7d789cb2f9..530baef06a76d712447aa720ea2f52718b52be0e 100644
--- a/google_apis/gaia/gaia_oauth_client_unittest.cc
+++ b/google_apis/gaia/gaia_oauth_client_unittest.cc
@@ -88,10 +88,11 @@ class MockOAuthFetcherFactory : public net::URLFetcherFactory,
complete_immediately_(true) {
}
~MockOAuthFetcherFactory() override {}
- net::URLFetcher* CreateURLFetcher(int id,
- const GURL& url,
- net::URLFetcher::RequestType request_type,
- net::URLFetcherDelegate* d) override {
+ scoped_ptr<net::URLFetcher> CreateURLFetcher(
+ int id,
+ const GURL& url,
+ net::URLFetcher::RequestType request_type,
+ net::URLFetcherDelegate* d) override {
url_fetcher_ = new MockOAuthFetcher(
response_code_,
max_failure_count_,
@@ -100,7 +101,7 @@ class MockOAuthFetcherFactory : public net::URLFetcherFactory,
results_,
request_type,
d);
- return url_fetcher_;
+ return scoped_ptr<net::URLFetcher>(url_fetcher_);
}
void set_response_code(int response_code) {
response_code_ = response_code;
« no previous file with comments | « google_apis/gaia/gaia_oauth_client.cc ('k') | google_apis/gaia/mock_url_fetcher_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698