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

Unified Diff: net/url_request/url_fetcher.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 | « net/url_request/url_fetcher.h ('k') | net/url_request/url_fetcher_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_fetcher.cc
diff --git a/net/url_request/url_fetcher.cc b/net/url_request/url_fetcher.cc
index faf70175deda1477791202abc42bf9454848813f..d4bd8200c25ed009c7768792f3ac250d6dde09a1 100644
--- a/net/url_request/url_fetcher.cc
+++ b/net/url_request/url_fetcher.cc
@@ -12,20 +12,21 @@ namespace net {
URLFetcher::~URLFetcher() {}
// static
-URLFetcher* URLFetcher::Create(const GURL& url,
- URLFetcher::RequestType request_type,
- URLFetcherDelegate* d) {
+scoped_ptr<URLFetcher> URLFetcher::Create(const GURL& url,
+ URLFetcher::RequestType request_type,
+ URLFetcherDelegate* d) {
return URLFetcher::Create(0, url, request_type, d);
}
// static
-URLFetcher* URLFetcher::Create(int id,
- const GURL& url,
- URLFetcher::RequestType request_type,
- URLFetcherDelegate* d) {
+scoped_ptr<URLFetcher> URLFetcher::Create(int id,
+ const GURL& url,
+ URLFetcher::RequestType request_type,
+ URLFetcherDelegate* d) {
URLFetcherFactory* factory = URLFetcherImpl::factory();
- return factory ? factory->CreateURLFetcher(id, url, request_type, d)
- : new URLFetcherImpl(url, request_type, d);
+ return factory
+ ? factory->CreateURLFetcher(id, url, request_type, d)
+ : scoped_ptr<URLFetcher>(new URLFetcherImpl(url, request_type, d));
}
// static
« no previous file with comments | « net/url_request/url_fetcher.h ('k') | net/url_request/url_fetcher_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698