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

Side by Side Diff: content/browser/devtools/protocol/tethering_handler.cc

Issue 2228403003: content: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/devtools/protocol/tethering_handler.h" 5 #include "content/browser/devtools/protocol/tethering_handler.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "net/base/io_buffer.h" 9 #include "net/base/io_buffer.h"
10 #include "net/base/ip_address.h" 10 #include "net/base/ip_address.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 }; 249 };
250 250
251 TetheringHandler::TetheringImpl::TetheringImpl( 251 TetheringHandler::TetheringImpl::TetheringImpl(
252 base::WeakPtr<TetheringHandler> handler, 252 base::WeakPtr<TetheringHandler> handler,
253 const CreateServerSocketCallback& socket_callback) 253 const CreateServerSocketCallback& socket_callback)
254 : handler_(handler), 254 : handler_(handler),
255 socket_callback_(socket_callback) { 255 socket_callback_(socket_callback) {
256 } 256 }
257 257
258 TetheringHandler::TetheringImpl::~TetheringImpl() { 258 TetheringHandler::TetheringImpl::~TetheringImpl() {
259 STLDeleteValues(&bound_sockets_); 259 base::STLDeleteValues(&bound_sockets_);
260 } 260 }
261 261
262 void TetheringHandler::TetheringImpl::Bind(DevToolsCommandId command_id, 262 void TetheringHandler::TetheringImpl::Bind(DevToolsCommandId command_id,
263 uint16_t port) { 263 uint16_t port) {
264 if (bound_sockets_.find(port) != bound_sockets_.end()) { 264 if (bound_sockets_.find(port) != bound_sockets_.end()) {
265 SendInternalError(command_id, "Port already bound"); 265 SendInternalError(command_id, "Port already bound");
266 return; 266 return;
267 } 267 }
268 268
269 BoundSocket::AcceptedCallback callback = base::Bind( 269 BoundSocket::AcceptedCallback callback = base::Bind(
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 } 391 }
392 392
393 void TetheringHandler::SendInternalError(DevToolsCommandId command_id, 393 void TetheringHandler::SendInternalError(DevToolsCommandId command_id,
394 const std::string& message) { 394 const std::string& message) {
395 client_->SendError(command_id, Response::InternalError(message)); 395 client_->SendError(command_id, Response::InternalError(message));
396 } 396 }
397 397
398 } // namespace tethering 398 } // namespace tethering
399 } // namespace devtools 399 } // namespace devtools
400 } // namespace content 400 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/child_process_security_policy_impl.cc ('k') | content/browser/download/download_item_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698