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

Unified Diff: net/url_request/url_fetcher.h

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/test_url_fetcher_factory.cc ('k') | net/url_request/url_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_fetcher.h
diff --git a/net/url_request/url_fetcher.h b/net/url_request/url_fetcher.h
index e08bdaadce457757cab222252d736c34a1b2e4fc..8d2c1b5f1ae950831e65bbc411f833f576b0562a 100644
--- a/net/url_request/url_fetcher.h
+++ b/net/url_request/url_fetcher.h
@@ -37,9 +37,10 @@ typedef std::vector<std::string> ResponseCookies;
// To use this class, create an instance with the desired URL and a pointer to
// the object to be notified when the URL has been loaded:
-// scoped_ptr<URLFetcher> fetcher(URLFetcher::Create("http://www.google.com",
+// scoped_ptr<URLFetcher> fetcher =
+// URLFetcher::Create("http://www.google.com",
// URLFetcher::GET,
-// this));
+// this);
//
// You must also set a request context getter:
//
@@ -102,19 +103,17 @@ class NET_EXPORT URLFetcher {
// |url| is the URL to send the request to.
// |request_type| is the type of request to make.
// |d| the object that will receive the callback on fetch completion.
- // Caller is responsible for destroying the returned URLFetcher.
- static URLFetcher* Create(const GURL& url,
- URLFetcher::RequestType request_type,
- URLFetcherDelegate* d);
+ static scoped_ptr<URLFetcher> Create(const GURL& url,
+ URLFetcher::RequestType request_type,
+ URLFetcherDelegate* d);
// Like above, but if there's a URLFetcherFactory registered with the
// implementation it will be used. |id| may be used during testing to identify
// who is creating the URLFetcher.
- // Caller is responsible for destroying the returned URLFetcher.
- static URLFetcher* Create(int id,
- const GURL& url,
- URLFetcher::RequestType request_type,
- URLFetcherDelegate* d);
+ static scoped_ptr<URLFetcher> Create(int id,
+ const GURL& url,
+ URLFetcher::RequestType request_type,
+ URLFetcherDelegate* d);
// Cancels all existing URLFetchers. Will notify the URLFetcherDelegates.
// Note that any new URLFetchers created while this is running will not be
« no previous file with comments | « net/url_request/test_url_fetcher_factory.cc ('k') | net/url_request/url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698