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

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

Issue 1358513003: Use correct IntToString variants in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 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 <algorithm> 7 #include <algorithm>
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 void TCPDeviceProvider::QueryDeviceInfo(const std::string& serial, 90 void TCPDeviceProvider::QueryDeviceInfo(const std::string& serial,
91 const DeviceInfoCallback& callback) { 91 const DeviceInfoCallback& callback) {
92 AndroidDeviceManager::DeviceInfo device_info; 92 AndroidDeviceManager::DeviceInfo device_info;
93 device_info.model = kDeviceModel; 93 device_info.model = kDeviceModel;
94 device_info.connected = true; 94 device_info.connected = true;
95 95
96 for (const net::HostPortPair& target : targets_) { 96 for (const net::HostPortPair& target : targets_) {
97 if (serial != target.host()) 97 if (serial != target.host())
98 continue; 98 continue;
99 AndroidDeviceManager::BrowserInfo browser_info; 99 AndroidDeviceManager::BrowserInfo browser_info;
100 browser_info.socket_name = base::IntToString(target.port()); 100 browser_info.socket_name = base::UintToString(target.port());
101 browser_info.display_name = kBrowserName; 101 browser_info.display_name = kBrowserName;
102 browser_info.type = AndroidDeviceManager::BrowserInfo::kTypeChrome; 102 browser_info.type = AndroidDeviceManager::BrowserInfo::kTypeChrome;
103 103
104 device_info.browser_info.push_back(browser_info); 104 device_info.browser_info.push_back(browser_info);
105 } 105 }
106 106
107 base::ThreadTaskRunnerHandle::Get()->PostTask( 107 base::ThreadTaskRunnerHandle::Get()->PostTask(
108 FROM_HERE, base::Bind(callback, device_info)); 108 FROM_HERE, base::Bind(callback, device_info));
109 } 109 }
110 110
(...skipping 13 matching lines...) Expand all
124 release_callback_.Run(); 124 release_callback_.Run();
125 } 125 }
126 126
127 void TCPDeviceProvider::set_release_callback_for_test( 127 void TCPDeviceProvider::set_release_callback_for_test(
128 const base::Closure& callback) { 128 const base::Closure& callback) {
129 release_callback_ = callback; 129 release_callback_ = callback;
130 } 130 }
131 131
132 TCPDeviceProvider::~TCPDeviceProvider() { 132 TCPDeviceProvider::~TCPDeviceProvider() {
133 } 133 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/search_provider_unittest.cc ('k') | chrome/browser/devtools/remote_debugging_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698