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

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
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" 22 #include "crypto/nss_util.h"
Eugene But (OOO till 7-30) 2016/04/19 15:00:12 Do you still need this include?
svaldez 2016/04/19 15:12:25 Done.
23 #include "ios/web/net/cookie_notification_bridge.h" 23 #include "ios/web/net/cookie_notification_bridge.h"
24 #include "ios/web/public/app/web_main_parts.h" 24 #include "ios/web/public/app/web_main_parts.h"
25 #include "ios/web/public/web_client.h" 25 #include "ios/web/public/web_client.h"
26 #include "ios/web/web_thread_impl.h" 26 #include "ios/web/web_thread_impl.h"
27 #include "ios/web/webui/url_data_manager_ios.h" 27 #include "ios/web/webui/url_data_manager_ios.h"
28 #include "net/base/network_change_notifier.h" 28 #include "net/base/network_change_notifier.h"
29 29
30 namespace web { 30 namespace web {
31 31
32 // The currently-running WebMainLoop. There can be one or zero. 32 // The currently-running WebMainLoop. There can be one or zero.
(...skipping 12 matching lines...) Expand all
45 g_current_web_main_loop = nullptr; 45 g_current_web_main_loop = nullptr;
46 } 46 }
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 }
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(); 55 parts_->PostEarlyInitialization();
64 } 56 }
65 } 57 }
66 58
67 void WebMainLoop::MainMessageLoopStart() { 59 void WebMainLoop::MainMessageLoopStart() {
68 if (parts_) { 60 if (parts_) {
69 parts_->PreMainMessageLoopStart(); 61 parts_->PreMainMessageLoopStart();
70 } 62 }
71 63
72 // Create a MessageLoop if one does not already exist for the current thread. 64 // 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( 265 main_thread_.reset(
274 new WebThreadImpl(WebThread::UI, base::MessageLoop::current())); 266 new WebThreadImpl(WebThread::UI, base::MessageLoop::current()));
275 } 267 }
276 268
277 int WebMainLoop::WebThreadsStarted() { 269 int WebMainLoop::WebThreadsStarted() {
278 cookie_notification_bridge_.reset(new CookieNotificationBridge); 270 cookie_notification_bridge_.reset(new CookieNotificationBridge);
279 return result_code_; 271 return result_code_;
280 } 272 }
281 273
282 } // namespace web 274 } // namespace web
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698