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

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

Issue 10386063: Move URLFetcherDelegate to net/ and split URLFetcher between net/ and content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head, fix win component build Created 8 years, 7 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/public/common/url_fetcher.h ('k') | content/public/common/url_fetcher_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/url_fetcher_delegate.h
diff --git a/content/public/common/url_fetcher_delegate.h b/content/public/common/url_fetcher_delegate.h
index 46eb15c1f3c6684beae6619c2b562a5e59f3a92b..c46ee1777a938b484527467ee2c764fe9a3a90c5 100644
--- a/content/public/common/url_fetcher_delegate.h
+++ b/content/public/common/url_fetcher_delegate.h
@@ -6,51 +6,19 @@
#define CONTENT_PUBLIC_COMMON_URL_FETCHER_DELEGATE_H_
#pragma once
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "content/common/content_export.h"
+#include "net/url_request/url_fetcher_delegate.h"
namespace content {
+// TODO(akalin): Update all users of URLFetcherDelegate to use
+// net::URLFetcherDelegate and remove this file.
+
class URLFetcher;
-// A delegate interface for users of URLFetcher.
-class CONTENT_EXPORT URLFetcherDelegate {
- public:
- // This will be called when the URL has been fetched, successfully or not.
- // Use accessor methods on |source| to get the results.
- virtual void OnURLFetchComplete(const URLFetcher* source) = 0;
-
- // This will be called when some part of the response is read. |current|
- // denotes the number of bytes received up to the call, and |total| is the
- // expected total size of the response (or -1 if not determined).
- virtual void OnURLFetchDownloadProgress(const URLFetcher* source,
- int64 current, int64 total) {}
-
- // This will be called when some part of the response is read.
- // |download_data| contains the current bytes received since the last call.
- // This will be called after ShouldSendDownloadData() and only if the latter
- // returns true.
- virtual void OnURLFetchDownloadData(const URLFetcher* source,
- scoped_ptr<std::string> download_data) {}
-
- // This indicates if OnURLFetchDownloadData should be called.
- // This will be called before OnURLFetchDownloadData is called, and only if
- // this returns true.
- // Default implementation is false.
- virtual bool ShouldSendDownloadData();
-
- // This will be called when uploading of POST or PUT requests proceeded.
- // |current| denotes the number of bytes sent so far, and |total| is the
- // total size of uploading data (or -1 if chunked upload is enabled).
- virtual void OnURLFetchUploadProgress(const URLFetcher* source,
- int64 current, int64 total) {}
-
- protected:
- virtual ~URLFetcherDelegate() {}
-};
+// We inherit from net::URLFetcherDelegate so that we can still
+// forward-declare URLFetcherDelegate (which we can't do with a
+// typedef).
+class URLFetcherDelegate : public net::URLFetcherDelegate {};
} // namespace content
« no previous file with comments | « content/public/common/url_fetcher.h ('k') | content/public/common/url_fetcher_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698