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

Unified Diff: webkit/glue/resource_fetcher.h

Issue 8550010: base::Bind() conversion for webkit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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 | « webkit/glue/image_resource_fetcher.cc ('k') | webkit/glue/resource_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « webkit/glue/image_resource_fetcher.cc ('k') | webkit/glue/resource_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698