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

Unified Diff: components/test_runner/mock_webrtc_data_channel_handler.cc

Issue 2357043003: Remove WebCallbackTask (Closed)
Patch Set: remove WebTaskRunner::postTask(base::Closure). git cl format Created 4 years, 3 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
Index: components/test_runner/mock_webrtc_data_channel_handler.cc
diff --git a/components/test_runner/mock_webrtc_data_channel_handler.cc b/components/test_runner/mock_webrtc_data_channel_handler.cc
index 797651f4d26faa6133d22afd1259392a1f624ed2..b37e04ead6a17ee3bc5dbd913bf664625d9c02ca 100644
--- a/components/test_runner/mock_webrtc_data_channel_handler.cc
+++ b/components/test_runner/mock_webrtc_data_channel_handler.cc
@@ -7,7 +7,6 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/logging.h"
-#include "components/test_runner/web_task.h"
#include "components/test_runner/web_test_delegate.h"
#include "third_party/WebKit/public/platform/WebRTCDataChannelHandlerClient.h"
@@ -34,9 +33,9 @@ void MockWebRTCDataChannelHandler::setClient(
WebRTCDataChannelHandlerClient* client) {
client_ = client;
if (client_)
- delegate_->PostTask(new WebCallbackTask(
+ delegate_->PostTask(
base::Bind(&MockWebRTCDataChannelHandler::ReportOpenedState,
- weak_factory_.GetWeakPtr())));
+ weak_factory_.GetWeakPtr()));
}
blink::WebString MockWebRTCDataChannelHandler::label() {
@@ -94,9 +93,9 @@ bool MockWebRTCDataChannelHandler::sendRawData(const char* data, size_t size) {
void MockWebRTCDataChannelHandler::close() {
DCHECK(client_);
- delegate_->PostTask(new WebCallbackTask(
+ delegate_->PostTask(
base::Bind(&MockWebRTCDataChannelHandler::ReportClosedState,
- weak_factory_.GetWeakPtr())));
+ weak_factory_.GetWeakPtr()));
}
void MockWebRTCDataChannelHandler::ReportOpenedState() {
« no previous file with comments | « components/test_runner/mock_web_user_media_client.cc ('k') | components/test_runner/mock_webrtc_dtmf_sender_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698