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

Unified Diff: chrome/browser/cancelable_request.h

Issue 8960010: base::Bind: Convert NewRunnableMethod in chrome/browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix 55. Created 9 years 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 | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cancelable_request.h
diff --git a/chrome/browser/cancelable_request.h b/chrome/browser/cancelable_request.h
index 2bb76c212dd42ca84efe774d061e0b05e6597d6d..82ee12d3f517695a684df0d54deadd4383da20d7 100644
--- a/chrome/browser/cancelable_request.h
+++ b/chrome/browser/cancelable_request.h
@@ -48,8 +48,9 @@
// AddRequest(request, consumer);
//
// // Send the parameters and the request to the backend thread.
-// backend_thread_->PostTask(FROM_HERE,
-// NewRunnableMethod(backend_, &Backend::DoRequest, request,
+// backend_thread_->PostTask(
+// FROM_HERE,
+// base::Bind(&Backend::DoRequest, backend_, request,
// some_input1, some_input2));
//
// // The handle will have been set by AddRequest.
@@ -673,8 +674,9 @@ class CancelableRequest : public CancelableRequestBase {
// We can do synchronous callbacks when we're on the same thread.
ExecuteCallback(param);
} else {
- callback_thread_->PostTask(FROM_HERE, NewRunnableMethod(this,
- &CancelableRequest<CB>::ExecuteCallback, param));
+ callback_thread_->PostTask(
+ FROM_HERE,
+ base::Bind(&CancelableRequest<CB>::ExecuteCallback, this, param));
}
}
}
@@ -683,8 +685,9 @@ class CancelableRequest : public CancelableRequestBase {
void ForwardResultAsync(const TupleType& param) {
DCHECK(callback_.get());
if (!canceled()) {
- callback_thread_->PostTask(FROM_HERE, NewRunnableMethod(this,
- &CancelableRequest<CB>::ExecuteCallback, param));
+ callback_thread_->PostTask(
+ FROM_HERE,
+ base::Bind(&CancelableRequest<CB>::ExecuteCallback, this, param));
}
}
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698