OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/remote_debugging_server.h" | 5 #include "chrome/browser/devtools/remote_debugging_server.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 } | 145 } |
146 | 146 |
147 } // namespace | 147 } // namespace |
148 | 148 |
149 // static | 149 // static |
150 void RemoteDebuggingServer::EnableTetheringForDebug() { | 150 void RemoteDebuggingServer::EnableTetheringForDebug() { |
151 g_tethering_enabled.Get() = true; | 151 g_tethering_enabled.Get() = true; |
152 } | 152 } |
153 | 153 |
154 RemoteDebuggingServer::RemoteDebuggingServer( | 154 RemoteDebuggingServer::RemoteDebuggingServer( |
155 chrome::HostDesktopType host_desktop_type, | 155 ui::HostDesktopType host_desktop_type, |
156 const std::string& ip, | 156 const std::string& ip, |
157 uint16 port) { | 157 uint16 port) { |
158 base::FilePath output_dir; | 158 base::FilePath output_dir; |
159 if (!port) { | 159 if (!port) { |
160 // The client requested an ephemeral port. Must write the selected | 160 // The client requested an ephemeral port. Must write the selected |
161 // port to a well-known location in the profile directory to | 161 // port to a well-known location in the profile directory to |
162 // bootstrap the connection process. | 162 // bootstrap the connection process. |
163 bool result = PathService::Get(chrome::DIR_USER_DATA, &output_dir); | 163 bool result = PathService::Get(chrome::DIR_USER_DATA, &output_dir); |
164 DCHECK(result); | 164 DCHECK(result); |
165 } | 165 } |
(...skipping 11 matching lines...) Expand all Loading... |
177 debug_frontend_dir, | 177 debug_frontend_dir, |
178 version_info::GetProductNameAndVersionForUserAgent(), | 178 version_info::GetProductNameAndVersionForUserAgent(), |
179 ::GetUserAgent())); | 179 ::GetUserAgent())); |
180 } | 180 } |
181 | 181 |
182 RemoteDebuggingServer::~RemoteDebuggingServer() { | 182 RemoteDebuggingServer::~RemoteDebuggingServer() { |
183 // Ensure Profile is alive, because the whole DevTools subsystem | 183 // Ensure Profile is alive, because the whole DevTools subsystem |
184 // accesses it during shutdown. | 184 // accesses it during shutdown. |
185 DCHECK(g_browser_process->profile_manager()); | 185 DCHECK(g_browser_process->profile_manager()); |
186 } | 186 } |
OLD | NEW |