Chromium Code Reviews| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 98 if (!port) { | 98 if (!port) { |
| 99 // The client requested an ephemeral port. Must write the selected | 99 // The client requested an ephemeral port. Must write the selected |
| 100 // port to a well-known location in the profile directory to | 100 // port to a well-known location in the profile directory to |
| 101 // bootstrap the connection process. | 101 // bootstrap the connection process. |
| 102 bool result = PathService::Get(chrome::DIR_USER_DATA, &output_dir); | 102 bool result = PathService::Get(chrome::DIR_USER_DATA, &output_dir); |
| 103 DCHECK(result); | 103 DCHECK(result); |
| 104 } | 104 } |
| 105 | 105 |
| 106 base::FilePath debug_frontend_dir; | 106 base::FilePath debug_frontend_dir; |
| 107 #if defined(DEBUG_DEVTOOLS) | 107 #if defined(DEBUG_DEVTOOLS) |
| 108 PathService::Get(chrome::DIR_INSPECTOR, &debug_frontend_dir); | 108 PathService::Get(chrome::DIR_INSPECTOR_DEBUG, &debug_frontend_dir); |
|
pfeldman
2016/10/27 20:50:27
it is already fixed.
dgozman
2016/10/28 00:22:31
Reverted.
| |
| 109 #endif | 109 #endif |
| 110 | 110 |
| 111 content::DevToolsAgentHost::StartRemoteDebuggingServer( | 111 content::DevToolsAgentHost::StartRemoteDebuggingServer( |
| 112 base::MakeUnique<TCPServerSocketFactory>(ip, port), | 112 base::MakeUnique<TCPServerSocketFactory>(ip, port), |
| 113 std::string(), | 113 std::string(), |
| 114 output_dir, | 114 output_dir, |
| 115 debug_frontend_dir, | 115 debug_frontend_dir, |
| 116 version_info::GetProductNameAndVersionForUserAgent(), | 116 version_info::GetProductNameAndVersionForUserAgent(), |
| 117 ::GetUserAgent()); | 117 ::GetUserAgent()); |
| 118 } | 118 } |
| 119 | 119 |
| 120 RemoteDebuggingServer::~RemoteDebuggingServer() { | 120 RemoteDebuggingServer::~RemoteDebuggingServer() { |
| 121 // Ensure Profile is alive, because the whole DevTools subsystem | 121 // Ensure Profile is alive, because the whole DevTools subsystem |
| 122 // accesses it during shutdown. | 122 // accesses it during shutdown. |
| 123 DCHECK(g_browser_process->profile_manager()); | 123 DCHECK(g_browser_process->profile_manager()); |
| 124 content::DevToolsAgentHost::StopRemoteDebuggingServer(); | 124 content::DevToolsAgentHost::StopRemoteDebuggingServer(); |
| 125 } | 125 } |
| OLD | NEW |