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

Side by Side Diff: ios/web/app/web_main_loop.mm

Issue 1882433002: Removing NSS files and USE_OPENSSL flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 8 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 | « ios/crnet/crnet_environment.mm ('k') | net/BUILD.gn » ('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 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
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "base/metrics/histogram.h" 15 #include "base/metrics/histogram.h"
16 #include "base/path_service.h" 16 #include "base/path_service.h"
17 #include "base/power_monitor/power_monitor.h" 17 #include "base/power_monitor/power_monitor.h"
18 #include "base/power_monitor/power_monitor_device_source.h" 18 #include "base/power_monitor/power_monitor_device_source.h"
19 #include "base/process/process_metrics.h" 19 #include "base/process/process_metrics.h"
20 #include "base/system_monitor/system_monitor.h" 20 #include "base/system_monitor/system_monitor.h"
21 #include "base/threading/thread_restrictions.h" 21 #include "base/threading/thread_restrictions.h"
22 #include "crypto/nss_util.h"
23 #include "ios/web/net/cookie_notification_bridge.h" 22 #include "ios/web/net/cookie_notification_bridge.h"
24 #include "ios/web/public/app/web_main_parts.h" 23 #include "ios/web/public/app/web_main_parts.h"
25 #include "ios/web/public/web_client.h" 24 #include "ios/web/public/web_client.h"
26 #include "ios/web/web_thread_impl.h" 25 #include "ios/web/web_thread_impl.h"
27 #include "ios/web/webui/url_data_manager_ios.h" 26 #include "ios/web/webui/url_data_manager_ios.h"
28 #include "net/base/network_change_notifier.h" 27 #include "net/base/network_change_notifier.h"
29 28
30 namespace web { 29 namespace web {
31 30
32 // The currently-running WebMainLoop. There can be one or zero. 31 // The currently-running WebMainLoop. There can be one or zero.
(...skipping 12 matching lines...) Expand all
45 g_current_web_main_loop = nullptr; 44 g_current_web_main_loop = nullptr;
46 } 45 }
47 46
48 void WebMainLoop::Init() { 47 void WebMainLoop::Init() {
49 parts_.reset(web::GetWebClient()->CreateWebMainParts()); 48 parts_.reset(web::GetWebClient()->CreateWebMainParts());
50 } 49 }
51 50
52 void WebMainLoop::EarlyInitialization() { 51 void WebMainLoop::EarlyInitialization() {
53 if (parts_) { 52 if (parts_) {
54 parts_->PreEarlyInitialization(); 53 parts_->PreEarlyInitialization();
55 }
56
57 #if defined(USE_NSS_VERIFIER)
58 // We want to be sure to init NSPR on the main thread.
59 crypto::EnsureNSPRInit();
60 #endif
61
62 if (parts_) {
63 parts_->PostEarlyInitialization(); 54 parts_->PostEarlyInitialization();
64 } 55 }
65 } 56 }
66 57
67 void WebMainLoop::MainMessageLoopStart() { 58 void WebMainLoop::MainMessageLoopStart() {
68 if (parts_) { 59 if (parts_) {
69 parts_->PreMainMessageLoopStart(); 60 parts_->PreMainMessageLoopStart();
70 } 61 }
71 62
72 // Create a MessageLoop if one does not already exist for the current thread. 63 // Create a MessageLoop if one does not already exist for the current thread.
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 main_thread_.reset( 264 main_thread_.reset(
274 new WebThreadImpl(WebThread::UI, base::MessageLoop::current())); 265 new WebThreadImpl(WebThread::UI, base::MessageLoop::current()));
275 } 266 }
276 267
277 int WebMainLoop::WebThreadsStarted() { 268 int WebMainLoop::WebThreadsStarted() {
278 cookie_notification_bridge_.reset(new CookieNotificationBridge); 269 cookie_notification_bridge_.reset(new CookieNotificationBridge);
279 return result_code_; 270 return result_code_;
280 } 271 }
281 272
282 } // namespace web 273 } // namespace web
OLDNEW
« no previous file with comments | « ios/crnet/crnet_environment.mm ('k') | net/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698