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

Side by Side Diff: chrome/browser/devtools/device/tcp_device_provider.cc

Issue 2230203002: chrome: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed accidental components/ change 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 "chrome/browser/devtools/device/tcp_device_provider.h" 5 #include "chrome/browser/devtools/device/tcp_device_provider.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 76
77 TCPDeviceProvider::TCPDeviceProvider(const HostPortSet& targets) 77 TCPDeviceProvider::TCPDeviceProvider(const HostPortSet& targets)
78 : targets_(targets) { 78 : targets_(targets) {
79 } 79 }
80 80
81 void TCPDeviceProvider::QueryDevices(const SerialsCallback& callback) { 81 void TCPDeviceProvider::QueryDevices(const SerialsCallback& callback) {
82 std::vector<std::string> result; 82 std::vector<std::string> result;
83 for (const net::HostPortPair& target : targets_) { 83 for (const net::HostPortPair& target : targets_) {
84 const std::string& host = target.host(); 84 const std::string& host = target.host();
85 if (ContainsValue(result, host)) 85 if (base::ContainsValue(result, host))
86 continue; 86 continue;
87 result.push_back(host); 87 result.push_back(host);
88 } 88 }
89 callback.Run(result); 89 callback.Run(result);
90 } 90 }
91 91
92 void TCPDeviceProvider::QueryDeviceInfo(const std::string& serial, 92 void TCPDeviceProvider::QueryDeviceInfo(const std::string& serial,
93 const DeviceInfoCallback& callback) { 93 const DeviceInfoCallback& callback) {
94 AndroidDeviceManager::DeviceInfo device_info; 94 AndroidDeviceManager::DeviceInfo device_info;
95 device_info.model = kDeviceModel; 95 device_info.model = kDeviceModel;
(...skipping 30 matching lines...) Expand all
126 release_callback_.Run(); 126 release_callback_.Run();
127 } 127 }
128 128
129 void TCPDeviceProvider::set_release_callback_for_test( 129 void TCPDeviceProvider::set_release_callback_for_test(
130 const base::Closure& callback) { 130 const base::Closure& callback) {
131 release_callback_ = callback; 131 release_callback_ = callback;
132 } 132 }
133 133
134 TCPDeviceProvider::~TCPDeviceProvider() { 134 TCPDeviceProvider::~TCPDeviceProvider() {
135 } 135 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/device/port_forwarding_controller.cc ('k') | chrome/browser/devtools/devtools_targets_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698