| Index: net/url_request/url_fetcher_delegate.h
|
| diff --git a/content/public/common/url_fetcher_delegate.h b/net/url_request/url_fetcher_delegate.h
|
| similarity index 78%
|
| copy from content/public/common/url_fetcher_delegate.h
|
| copy to net/url_request/url_fetcher_delegate.h
|
| index 46eb15c1f3c6684beae6619c2b562a5e59f3a92b..5069cb6890b62ff1647eed9ec518f33baa2a9013 100644
|
| --- a/content/public/common/url_fetcher_delegate.h
|
| +++ b/net/url_request/url_fetcher_delegate.h
|
| @@ -2,22 +2,22 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CONTENT_PUBLIC_COMMON_URL_FETCHER_DELEGATE_H_
|
| -#define CONTENT_PUBLIC_COMMON_URL_FETCHER_DELEGATE_H_
|
| +#ifndef NET_URL_REQUEST_URL_FETCHER_DELEGATE_H_
|
| +#define NET_URL_REQUEST_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/base/net_export.h"
|
|
|
| -namespace content {
|
| +namespace net {
|
|
|
| class URLFetcher;
|
|
|
| // A delegate interface for users of URLFetcher.
|
| -class CONTENT_EXPORT URLFetcherDelegate {
|
| +class NET_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.
|
| @@ -27,14 +27,14 @@ class CONTENT_EXPORT URLFetcherDelegate {
|
| // 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) {}
|
| + 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) {}
|
| + scoped_ptr<std::string> download_data);
|
|
|
| // This indicates if OnURLFetchDownloadData should be called.
|
| // This will be called before OnURLFetchDownloadData is called, and only if
|
| @@ -46,12 +46,20 @@ class CONTENT_EXPORT URLFetcherDelegate {
|
| // |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) {}
|
| + int64 current, int64 total);
|
| +
|
| + // TODO(akalin): Remove this hack once rlz is updated to use
|
| + // net::URLFetcher{,Delegate}.
|
| +#ifdef RLZ_LIB_FINANCIAL_PING_H_
|
| + struct content {
|
| + typedef ::net::URLFetcher URLFetcher;
|
| + };
|
| +#endif
|
|
|
| protected:
|
| - virtual ~URLFetcherDelegate() {}
|
| + virtual ~URLFetcherDelegate();
|
| };
|
|
|
| -} // namespace content
|
| +} // namespace net
|
|
|
| -#endif // CONTENT_PUBLIC_COMMON_URL_FETCHER_DELEGATE_H_
|
| +#endif // NET_URL_REQUEST_URL_FETCHER_DELEGATE_H_
|
|
|