| 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
|
|
|
|
|