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

Side by Side Diff: remoting/host/remoting_me2me_host.cc

Issue 10543106: Add an explicit function to init NSS for SSL server sockets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated Created 8 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 | Annotate | Revision Log
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 // This file implements a standalone host process for Me2Me. 5 // This file implements a standalone host process for Me2Me.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/file_util.h" 14 #include "base/file_util.h"
15 #include "base/files/file_path_watcher.h" 15 #include "base/files/file_path_watcher.h"
16 #include "base/logging.h" 16 #include "base/logging.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "base/message_loop.h" 18 #include "base/message_loop.h"
19 #include "base/synchronization/waitable_event.h" 19 #include "base/synchronization/waitable_event.h"
20 #include "base/threading/thread.h" 20 #include "base/threading/thread.h"
21 #include "build/build_config.h" 21 #include "build/build_config.h"
22 #include "crypto/nss_util.h" 22 #include "crypto/nss_util.h"
23 #include "net/base/network_change_notifier.h" 23 #include "net/base/network_change_notifier.h"
24 #include "net/socket/ssl_server_socket.h"
24 #include "remoting/base/breakpad.h" 25 #include "remoting/base/breakpad.h"
25 #include "remoting/base/constants.h" 26 #include "remoting/base/constants.h"
26 #include "remoting/host/branding.h" 27 #include "remoting/host/branding.h"
27 #include "remoting/host/breakpad.h" 28 #include "remoting/host/breakpad.h"
28 #include "remoting/host/constants.h" 29 #include "remoting/host/constants.h"
29 #include "remoting/host/capturer.h" 30 #include "remoting/host/capturer.h"
30 #include "remoting/host/chromoting_host.h" 31 #include "remoting/host/chromoting_host.h"
31 #include "remoting/host/chromoting_host_context.h" 32 #include "remoting/host/chromoting_host_context.h"
32 #include "remoting/host/desktop_environment.h" 33 #include "remoting/host/desktop_environment.h"
33 #include "remoting/host/event_executor.h" 34 #include "remoting/host/event_executor.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 : message_loop_(MessageLoop::TYPE_UI), 92 : message_loop_(MessageLoop::TYPE_UI),
92 #ifdef OFFICIAL_BUILD 93 #ifdef OFFICIAL_BUILD
93 oauth_use_official_client_id_(true), 94 oauth_use_official_client_id_(true),
94 #else 95 #else
95 oauth_use_official_client_id_(false), 96 oauth_use_official_client_id_(false),
96 #endif 97 #endif
97 allow_nat_traversal_(true), 98 allow_nat_traversal_(true),
98 restarting_(false), 99 restarting_(false),
99 shutting_down_(false), 100 shutting_down_(false),
100 exit_code_(kSuccessExitCode) { 101 exit_code_(kSuccessExitCode) {
102 net::EnableSSLServerSockets();
Wez 2012/06/12 21:30:35 nit: Add a comment explaining why we have to do th
101 context_.reset( 103 context_.reset(
102 new ChromotingHostContext(message_loop_.message_loop_proxy())); 104 new ChromotingHostContext(message_loop_.message_loop_proxy()));
103 context_->Start(); 105 context_->Start();
104 network_change_notifier_.reset(net::NetworkChangeNotifier::Create()); 106 network_change_notifier_.reset(net::NetworkChangeNotifier::Create());
105 config_updated_timer_.reset(new base::DelayTimer<HostProcess>( 107 config_updated_timer_.reset(new base::DelayTimer<HostProcess>(
106 FROM_HERE, base::TimeDelta::FromSeconds(2), this, 108 FROM_HERE, base::TimeDelta::FromSeconds(2), this,
107 &HostProcess::ConfigUpdatedDelayed)); 109 &HostProcess::ConfigUpdatedDelayed));
108 } 110 }
109 111
110 void InitWithCommandLine(const CommandLine* cmd_line) { 112 void InitWithCommandLine(const CommandLine* cmd_line) {
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 576
575 // Mark the process as DPI-aware, so Windows won't scale coordinates in APIs. 577 // Mark the process as DPI-aware, so Windows won't scale coordinates in APIs.
576 SetProcessDPIAware(); 578 SetProcessDPIAware();
577 579
578 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting 580 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting
579 // the command line from GetCommandLineW(), so we can safely pass NULL here. 581 // the command line from GetCommandLineW(), so we can safely pass NULL here.
580 return main(0, NULL); 582 return main(0, NULL);
581 } 583 }
582 584
583 #endif // defined(OS_WIN) 585 #endif // defined(OS_WIN)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698