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

Unified Diff: content/public/common/url_fetcher.h

Issue 10554008: Move content::URLFetcher static functions to net::URLFetcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win link error Created 8 years, 6 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 | « content/common/net/url_fetcher.cc ('k') | net/url_request/url_fetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/url_fetcher.h
diff --git a/content/public/common/url_fetcher.h b/content/public/common/url_fetcher.h
index ac5ba60932d1368d36356e04cfa8060d47366d38..d30c145f927f1ee7cf9e53c1349ddea5a9c61eed 100644
--- a/content/public/common/url_fetcher.h
+++ b/content/public/common/url_fetcher.h
@@ -7,46 +7,37 @@
#pragma once
#include "content/common/content_export.h"
+
+// TODO(akalin): Remove this block once rlz is updated to use
+// url_fetcher.h from net/.
+#ifdef RLZ_LIB_FINANCIAL_PING_H_
+
#include "net/url_request/url_fetcher.h"
+#endif
+
+class GURL;
+
namespace net {
-class URLFetcherDelegate;
-} // namespace net
+class URLFetcher;
+} // namespace
namespace content {
-// TODO(akalin): Move the static functions to net::URLFetcher and
-// remove content::URLFetcher.
-class CONTENT_EXPORT URLFetcher {
- public:
- // |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.
- static net::URLFetcher* Create(const GURL& url,
- net::URLFetcher::RequestType request_type,
- net::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.
- static net::URLFetcher* Create(int id,
- const GURL& url,
- net::URLFetcher::RequestType request_type,
- net::URLFetcherDelegate* d);
-
- // Cancels all existing URLFetchers. Will notify the URLFetcherDelegates.
- // Note that any new URLFetchers created while this is running will not be
- // cancelled. Typically, one would call this in the CleanUp() method of an IO
- // thread, so that no new URLRequests would be able to start on the IO thread
- // anyway. This doesn't prevent new URLFetchers from trying to post to the IO
- // thread though, even though the task won't ever run.
- static void CancelAll();
-
- // Normally interception is disabled for URLFetcher, but you can use this
- // to enable it for tests. Also see ScopedURLFetcherFactory for another way
- // of testing code that uses an URLFetcher.
- static void SetEnableInterceptionForTests(bool enabled);
-};
+// TODO(akalin): Remove this block once rlz is updated to use
+// url_fetcher.h from net/.
+#ifdef RLZ_LIB_FINANCIAL_PING_H_
+
+namespace URLFetcher {
+
+CONTENT_EXPORT net::URLFetcher* Create(
+ const GURL& url,
+ net::URLFetcher::RequestType request_type,
+ net::URLFetcherDelegate* d);
+
+} // namespace URLFetcher
+
+#endif // RLZ_LIB_FINANCIAL_PING_H_
// Mark URLRequests started by the URLFetcher to stem from the given render
// view.
« no previous file with comments | « content/common/net/url_fetcher.cc ('k') | net/url_request/url_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698