| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 bool result = PathService::Get(chrome::DIR_USER_DATA, &output_dir); | 101 bool result = PathService::Get(chrome::DIR_USER_DATA, &output_dir); |
| 102 DCHECK(result); | 102 DCHECK(result); |
| 103 } | 103 } |
| 104 | 104 |
| 105 base::FilePath debug_frontend_dir; | 105 base::FilePath debug_frontend_dir; |
| 106 #if defined(DEBUG_DEVTOOLS) | 106 #if defined(DEBUG_DEVTOOLS) |
| 107 PathService::Get(chrome::DIR_INSPECTOR, &debug_frontend_dir); | 107 PathService::Get(chrome::DIR_INSPECTOR, &debug_frontend_dir); |
| 108 #endif | 108 #endif |
| 109 | 109 |
| 110 content::DevToolsAgentHost::StartRemoteDebuggingServer( | 110 content::DevToolsAgentHost::StartRemoteDebuggingServer( |
| 111 base::WrapUnique(new TCPServerSocketFactory(ip, port)), | 111 base::MakeUnique<TCPServerSocketFactory>(ip, port), |
| 112 std::string(), | 112 std::string(), |
| 113 output_dir, | 113 output_dir, |
| 114 debug_frontend_dir, | 114 debug_frontend_dir, |
| 115 version_info::GetProductNameAndVersionForUserAgent(), | 115 version_info::GetProductNameAndVersionForUserAgent(), |
| 116 ::GetUserAgent()); | 116 ::GetUserAgent()); |
| 117 } | 117 } |
| 118 | 118 |
| 119 RemoteDebuggingServer::~RemoteDebuggingServer() { | 119 RemoteDebuggingServer::~RemoteDebuggingServer() { |
| 120 // Ensure Profile is alive, because the whole DevTools subsystem | 120 // Ensure Profile is alive, because the whole DevTools subsystem |
| 121 // accesses it during shutdown. | 121 // accesses it during shutdown. |
| 122 DCHECK(g_browser_process->profile_manager()); | 122 DCHECK(g_browser_process->profile_manager()); |
| 123 content::DevToolsAgentHost::StopRemoteDebuggingServer(); | 123 content::DevToolsAgentHost::StopRemoteDebuggingServer(); |
| 124 } | 124 } |
| OLD | NEW |