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: net/url_request/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 | « net/url_request/url_fetcher.cc ('k') | net/url_request/url_fetcher_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « net/url_request/url_fetcher.cc ('k') | net/url_request/url_fetcher_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698