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

Side by Side Diff: remoting/client/plugin/chromoting_instance.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 #include "remoting/client/plugin/chromoting_instance.h" 5 #include "remoting/client/plugin/chromoting_instance.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/json/json_reader.h" 12 #include "base/json/json_reader.h"
13 #include "base/json/json_writer.h" 13 #include "base/json/json_writer.h"
14 #include "base/lazy_instance.h" 14 #include "base/lazy_instance.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/stringprintf.h" 16 #include "base/stringprintf.h"
17 #include "base/string_split.h" 17 #include "base/string_split.h"
18 #include "base/synchronization/lock.h" 18 #include "base/synchronization/lock.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 "base/values.h" 21 #include "base/values.h"
22 #include "jingle/glue/thread_wrapper.h" 22 #include "jingle/glue/thread_wrapper.h"
23 #include "media/base/media.h" 23 #include "media/base/media.h"
24 #include "net/socket/ssl_server_socket.h"
24 #include "ppapi/cpp/completion_callback.h" 25 #include "ppapi/cpp/completion_callback.h"
25 #include "ppapi/cpp/input_event.h" 26 #include "ppapi/cpp/input_event.h"
26 #include "ppapi/cpp/mouse_cursor.h" 27 #include "ppapi/cpp/mouse_cursor.h"
27 #include "ppapi/cpp/rect.h" 28 #include "ppapi/cpp/rect.h"
28 #include "remoting/base/constants.h" 29 #include "remoting/base/constants.h"
29 #include "remoting/base/util.h" 30 #include "remoting/base/util.h"
30 #include "remoting/client/client_config.h" 31 #include "remoting/client/client_config.h"
31 #include "remoting/client/chromoting_client.h" 32 #include "remoting/client/chromoting_client.h"
32 #include "remoting/client/frame_consumer_proxy.h" 33 #include "remoting/client/frame_consumer_proxy.h"
33 #include "remoting/client/plugin/pepper_input_handler.h" 34 #include "remoting/client/plugin/pepper_input_handler.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 181
181 VLOG(1) << "Started ChromotingInstance::Init"; 182 VLOG(1) << "Started ChromotingInstance::Init";
182 183
183 // Check to make sure the media library is initialized. 184 // Check to make sure the media library is initialized.
184 // http://crbug.com/91521. 185 // http://crbug.com/91521.
185 if (!media::IsMediaLibraryInitialized()) { 186 if (!media::IsMediaLibraryInitialized()) {
186 LOG(ERROR) << "Media library not initialized."; 187 LOG(ERROR) << "Media library not initialized.";
187 return false; 188 return false;
188 } 189 }
189 190
191 net::EnableSSLServerSockets();
Wez 2012/06/12 21:30:35 In practice I doubt it's an issue, but the Chromot
Wez 2012/06/12 21:30:35 nit: Add a comment to explain why we need to have
Ryan Sleevi 2012/06/12 22:35:40 Right. I was trying to find where the post-sandbox
192
190 // Start all the threads. 193 // Start all the threads.
191 context_.Start(); 194 context_.Start();
192 195
193 // Create the chromoting objects that don't depend on the network connection. 196 // Create the chromoting objects that don't depend on the network connection.
194 // RectangleUpdateDecoder runs on a separate thread so for now we wrap 197 // RectangleUpdateDecoder runs on a separate thread so for now we wrap
195 // PepperView with a ref-counted proxy object. 198 // PepperView with a ref-counted proxy object.
196 scoped_refptr<FrameConsumerProxy> consumer_proxy = 199 scoped_refptr<FrameConsumerProxy> consumer_proxy =
197 new FrameConsumerProxy(plugin_message_loop_); 200 new FrameConsumerProxy(plugin_message_loop_);
198 rectangle_decoder_ = new RectangleUpdateDecoder( 201 rectangle_decoder_ = new RectangleUpdateDecoder(
199 context_.decode_message_loop(), consumer_proxy); 202 context_.decode_message_loop(), consumer_proxy);
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 PostChromotingMessage("logDebugMessage", data.Pass()); 703 PostChromotingMessage("logDebugMessage", data.Pass());
701 g_logging_to_plugin = false; 704 g_logging_to_plugin = false;
702 } 705 }
703 706
704 bool ChromotingInstance::IsConnected() { 707 bool ChromotingInstance::IsConnected() {
705 return host_connection_.get() && 708 return host_connection_.get() &&
706 (host_connection_->state() == protocol::ConnectionToHost::CONNECTED); 709 (host_connection_->state() == protocol::ConnectionToHost::CONNECTED);
707 } 710 }
708 711
709 } // namespace remoting 712 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698