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

Unified Diff: content/browser/devtools/protocol/tethering_handler.cc

Issue 1408363004: [DevTools] Filter any messages from previous sessions in DevToolsAgentHostImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: content/browser/devtools/protocol/tethering_handler.cc
diff --git a/content/browser/devtools/protocol/tethering_handler.cc b/content/browser/devtools/protocol/tethering_handler.cc
index 9b964f49d3827def0c320424d60f6cd74f7a6501..ec10eb2ad5ff9272e536ee4b8e791c5db0aeb455 100644
--- a/content/browser/devtools/protocol/tethering_handler.cc
+++ b/content/browser/devtools/protocol/tethering_handler.cc
@@ -264,8 +264,8 @@ TetheringHandler::TetheringImpl::~TetheringImpl() {
STLDeleteValues(&bound_sockets_);
}
-void TetheringHandler::TetheringImpl::Bind(
- DevToolsCommandId command_id, uint16 port) {
+void TetheringHandler::TetheringImpl::Bind(DevToolsCommandId command_id,
+ uint16 port) {
if (bound_sockets_.find(port) != bound_sockets_.end()) {
SendInternalError(command_id, "Port already bound");
return;
@@ -282,14 +282,12 @@ void TetheringHandler::TetheringImpl::Bind(
bound_sockets_[port] = bound_socket.release();
BrowserThread::PostTask(
- BrowserThread::UI,
- FROM_HERE,
+ BrowserThread::UI, FROM_HERE,
base::Bind(&TetheringHandler::SendBindSuccess, handler_, command_id));
}
-void TetheringHandler::TetheringImpl::Unbind(
- DevToolsCommandId command_id, uint16 port) {
-
+void TetheringHandler::TetheringImpl::Unbind(DevToolsCommandId command_id,
+ uint16 port) {
BoundSockets::iterator it = bound_sockets_.find(port);
if (it == bound_sockets_.end()) {
SendInternalError(command_id, "Port is not bound");
@@ -299,8 +297,7 @@ void TetheringHandler::TetheringImpl::Unbind(
delete it->second;
bound_sockets_.erase(it);
BrowserThread::PostTask(
- BrowserThread::UI,
- FROM_HERE,
+ BrowserThread::UI, FROM_HERE,
base::Bind(&TetheringHandler::SendUnbindSuccess, handler_, command_id));
}
@@ -315,11 +312,9 @@ void TetheringHandler::TetheringImpl::Accepted(
void TetheringHandler::TetheringImpl::SendInternalError(
DevToolsCommandId command_id,
const std::string& message) {
- BrowserThread::PostTask(
- BrowserThread::UI,
- FROM_HERE,
- base::Bind(&TetheringHandler::SendInternalError, handler_,
- command_id, message));
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ base::Bind(&TetheringHandler::SendInternalError,
+ handler_, command_id, message));
}

Powered by Google App Engine
This is Rietveld 408576698