Index: webkit/glue/resource_fetcher.h |
diff --git a/webkit/glue/resource_fetcher.h b/webkit/glue/resource_fetcher.h |
index 0a9de89c8a9247997c5af2d6f70029fe0b96d504..a1044c001b546949b05688a36a5bd8649b9ddfaf 100644 |
--- a/webkit/glue/resource_fetcher.h |
+++ b/webkit/glue/resource_fetcher.h |
@@ -15,7 +15,7 @@ |
#include <string> |
#include "base/basictypes.h" |
-#include "base/callback_old.h" |
+#include "base/callback.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/timer.h" |
#include "googleurl/src/gurl.h" |
@@ -38,13 +38,14 @@ class ResourceFetcher : public WebKit::WebURLLoaderClient { |
// This will be called when the URL has been fetched, successfully or not. |
// If there is a failure, response and data will both be empty. |response| |
// and |data| are both valid until the URLFetcher instance is destroyed. |
- typedef Callback2<const WebKit::WebURLResponse&, |
- const std::string&>::Type Callback; |
+ typedef base::Callback<void(const WebKit::WebURLResponse&, |
+ const std::string&)> Callback; |
// We need a frame to make requests. |
ResourceFetcher( |
const GURL& url, WebKit::WebFrame* frame, |
- WebKit::WebURLRequest::TargetType target_type, Callback* callback); |
+ WebKit::WebURLRequest::TargetType target_type, |
+ const Callback& callback); |
virtual ~ResourceFetcher(); |
// Stop the request and don't call the callback. |
@@ -95,7 +96,7 @@ class ResourceFetcher : public WebKit::WebURLLoaderClient { |
const std::string& data); |
// Callback when we're done |
- scoped_ptr<Callback> callback_; |
+ Callback callback_; |
// Buffer to hold the content from the server. |
std::string data_; |
@@ -112,7 +113,7 @@ class ResourceFetcherWithTimeout : public ResourceFetcher { |
WebKit::WebFrame* frame, |
WebKit::WebURLRequest::TargetType target_type, |
int timeout_secs, |
- Callback* callback); |
+ const Callback& callback); |
virtual ~ResourceFetcherWithTimeout(); |
private: |