OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ios/web/app/web_main_loop.h" | 5 #include "ios/web/app/web_main_loop.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 WebThreadImpl::ShutdownThreadPool(); | 247 WebThreadImpl::ShutdownThreadPool(); |
248 | 248 |
249 URLDataManagerIOS::DeleteDataSources(); | 249 URLDataManagerIOS::DeleteDataSources(); |
250 | 250 |
251 if (parts_) { | 251 if (parts_) { |
252 parts_->PostDestroyThreads(); | 252 parts_->PostDestroyThreads(); |
253 } | 253 } |
254 } | 254 } |
255 | 255 |
256 void WebMainLoop::InitializeMainThread() { | 256 void WebMainLoop::InitializeMainThread() { |
257 const char* kThreadName = "CrWebMain"; | 257 base::PlatformThread::SetName("CrWebMain"); |
258 base::PlatformThread::SetName(kThreadName); | |
259 if (main_message_loop_) { | |
260 main_message_loop_->set_thread_name(kThreadName); | |
261 } | |
262 | 258 |
263 // Register the main thread by instantiating it, but don't call any methods. | 259 // Register the main thread by instantiating it, but don't call any methods. |
264 main_thread_.reset( | 260 main_thread_.reset( |
265 new WebThreadImpl(WebThread::UI, base::MessageLoop::current())); | 261 new WebThreadImpl(WebThread::UI, base::MessageLoop::current())); |
266 } | 262 } |
267 | 263 |
268 int WebMainLoop::WebThreadsStarted() { | 264 int WebMainLoop::WebThreadsStarted() { |
269 cookie_notification_bridge_.reset(new CookieNotificationBridge); | 265 cookie_notification_bridge_.reset(new CookieNotificationBridge); |
270 return result_code_; | 266 return result_code_; |
271 } | 267 } |
272 | 268 |
273 } // namespace web | 269 } // namespace web |
OLD | NEW |