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

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

Issue 2082333002: Remove calls to deprecated MessageLoop methods in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 172
173 // Thread and ServerWrapper lifetime management ------------------------------ 173 // Thread and ServerWrapper lifetime management ------------------------------
174 174
175 void TerminateOnUI(base::Thread* thread, 175 void TerminateOnUI(base::Thread* thread,
176 ServerWrapper* server_wrapper, 176 ServerWrapper* server_wrapper,
177 DevToolsHttpHandler::ServerSocketFactory* socket_factory) { 177 DevToolsHttpHandler::ServerSocketFactory* socket_factory) {
178 DCHECK_CURRENTLY_ON(BrowserThread::UI); 178 DCHECK_CURRENTLY_ON(BrowserThread::UI);
179 if (server_wrapper) { 179 if (server_wrapper) {
180 DCHECK(thread); 180 DCHECK(thread);
181 thread->message_loop()->DeleteSoon(FROM_HERE, server_wrapper); 181 thread->task_runner()->DeleteSoon(FROM_HERE, server_wrapper);
182 } 182 }
183 if (socket_factory) { 183 if (socket_factory) {
184 DCHECK(thread); 184 DCHECK(thread);
185 thread->message_loop()->DeleteSoon(FROM_HERE, socket_factory); 185 thread->task_runner()->DeleteSoon(FROM_HERE, socket_factory);
186 } 186 }
187 if (thread) { 187 if (thread) {
188 BrowserThread::DeleteSoon(BrowserThread::FILE, FROM_HERE, thread); 188 BrowserThread::DeleteSoon(BrowserThread::FILE, FROM_HERE, thread);
189 } 189 }
190 } 190 }
191 191
192 void ServerStartedOnUI(base::WeakPtr<DevToolsHttpHandler> handler, 192 void ServerStartedOnUI(base::WeakPtr<DevToolsHttpHandler> handler,
193 base::Thread* thread, 193 base::Thread* thread,
194 ServerWrapper* server_wrapper, 194 ServerWrapper* server_wrapper,
195 DevToolsHttpHandler::ServerSocketFactory* socket_factory, 195 DevToolsHttpHandler::ServerSocketFactory* socket_factory,
(...skipping 734 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

Powered by Google App Engine
This is Rietveld 408576698