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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 void WebMainLoop::Init() { | 48 void WebMainLoop::Init() { |
49 parts_.reset(web::GetWebClient()->CreateWebMainParts()); | 49 parts_.reset(web::GetWebClient()->CreateWebMainParts()); |
50 } | 50 } |
51 | 51 |
52 void WebMainLoop::EarlyInitialization() { | 52 void WebMainLoop::EarlyInitialization() { |
53 if (parts_) { | 53 if (parts_) { |
54 parts_->PreEarlyInitialization(); | 54 parts_->PreEarlyInitialization(); |
55 } | 55 } |
56 | 56 |
| 57 #if defined(USE_NSS_VERIFIER) |
57 // We want to be sure to init NSPR on the main thread. | 58 // We want to be sure to init NSPR on the main thread. |
58 crypto::EnsureNSPRInit(); | 59 crypto::EnsureNSPRInit(); |
| 60 #endif |
59 | 61 |
60 if (parts_) { | 62 if (parts_) { |
61 parts_->PostEarlyInitialization(); | 63 parts_->PostEarlyInitialization(); |
62 } | 64 } |
63 } | 65 } |
64 | 66 |
65 void WebMainLoop::MainMessageLoopStart() { | 67 void WebMainLoop::MainMessageLoopStart() { |
66 if (parts_) { | 68 if (parts_) { |
67 parts_->PreMainMessageLoopStart(); | 69 parts_->PreMainMessageLoopStart(); |
68 } | 70 } |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 main_thread_.reset( | 273 main_thread_.reset( |
272 new WebThreadImpl(WebThread::UI, base::MessageLoop::current())); | 274 new WebThreadImpl(WebThread::UI, base::MessageLoop::current())); |
273 } | 275 } |
274 | 276 |
275 int WebMainLoop::WebThreadsStarted() { | 277 int WebMainLoop::WebThreadsStarted() { |
276 cookie_notification_bridge_.reset(new CookieNotificationBridge); | 278 cookie_notification_bridge_.reset(new CookieNotificationBridge); |
277 return result_code_; | 279 return result_code_; |
278 } | 280 } |
279 | 281 |
280 } // namespace web | 282 } // namespace web |
OLD | NEW |