| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 } | 203 } |
| 204 } | 204 } |
| 205 | 205 |
| 206 void StartServerOnHandlerThread( | 206 void StartServerOnHandlerThread( |
| 207 base::WeakPtr<DevToolsHttpHandler> handler, | 207 base::WeakPtr<DevToolsHttpHandler> handler, |
| 208 base::Thread* thread, | 208 base::Thread* thread, |
| 209 DevToolsHttpHandler::ServerSocketFactory* server_socket_factory, | 209 DevToolsHttpHandler::ServerSocketFactory* server_socket_factory, |
| 210 const base::FilePath& output_directory, | 210 const base::FilePath& output_directory, |
| 211 const base::FilePath& frontend_dir, | 211 const base::FilePath& frontend_dir, |
| 212 bool bundles_resources) { | 212 bool bundles_resources) { |
| 213 DCHECK_EQ(thread->message_loop(), base::MessageLoop::current()); | 213 DCHECK(thread->task_runner()->BelongsToCurrentThread()); |
| 214 ServerWrapper* server_wrapper = nullptr; | 214 ServerWrapper* server_wrapper = nullptr; |
| 215 std::unique_ptr<net::ServerSocket> server_socket = | 215 std::unique_ptr<net::ServerSocket> server_socket = |
| 216 server_socket_factory->CreateForHttpServer(); | 216 server_socket_factory->CreateForHttpServer(); |
| 217 std::unique_ptr<net::IPEndPoint> ip_address(new net::IPEndPoint); | 217 std::unique_ptr<net::IPEndPoint> ip_address(new net::IPEndPoint); |
| 218 if (server_socket) { | 218 if (server_socket) { |
| 219 server_wrapper = new ServerWrapper(handler, std::move(server_socket), | 219 server_wrapper = new ServerWrapper(handler, std::move(server_socket), |
| 220 frontend_dir, bundles_resources); | 220 frontend_dir, bundles_resources); |
| 221 if (!output_directory.empty()) | 221 if (!output_directory.empty()) |
| 222 server_wrapper->WriteActivePortToUserProfile(output_directory); | 222 server_wrapper->WriteActivePortToUserProfile(output_directory); |
| 223 | 223 |
| (...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 id.c_str(), | 930 id.c_str(), |
| 931 host); | 931 host); |
| 932 dictionary->SetString( | 932 dictionary->SetString( |
| 933 kTargetDevtoolsFrontendUrlField, devtools_frontend_url); | 933 kTargetDevtoolsFrontendUrlField, devtools_frontend_url); |
| 934 } | 934 } |
| 935 | 935 |
| 936 return dictionary; | 936 return dictionary; |
| 937 } | 937 } |
| 938 | 938 |
| 939 } // namespace devtools_http_handler | 939 } // namespace devtools_http_handler |
| OLD | NEW |