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

Side by Side Diff: components/devtools_http_handler/devtools_http_handler.cc

Issue 2087583002: Remove calls to MessageLoop::current() in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test error Created 4 years, 6 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
« no previous file with comments | « no previous file | components/invalidation/impl/sync_invalidation_listener_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | components/invalidation/impl/sync_invalidation_listener_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698