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

Side by Side Diff: remoting/client/plugin/chromoting_instance.cc

Issue 297863005: Call net::EnsureNSSSSLInit() in the remoting client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@git-svn
Patch Set: Created 6 years, 7 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 | « no previous file | remoting/protocol/libjingle_transport_factory.cc » ('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 (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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "remoting/client/plugin/pepper_audio_player.h" 47 #include "remoting/client/plugin/pepper_audio_player.h"
48 #include "remoting/client/plugin/pepper_input_handler.h" 48 #include "remoting/client/plugin/pepper_input_handler.h"
49 #include "remoting/client/plugin/pepper_port_allocator.h" 49 #include "remoting/client/plugin/pepper_port_allocator.h"
50 #include "remoting/client/plugin/pepper_token_fetcher.h" 50 #include "remoting/client/plugin/pepper_token_fetcher.h"
51 #include "remoting/client/plugin/pepper_view.h" 51 #include "remoting/client/plugin/pepper_view.h"
52 #include "remoting/client/software_video_renderer.h" 52 #include "remoting/client/software_video_renderer.h"
53 #include "remoting/protocol/connection_to_host.h" 53 #include "remoting/protocol/connection_to_host.h"
54 #include "remoting/protocol/host_stub.h" 54 #include "remoting/protocol/host_stub.h"
55 #include "remoting/protocol/libjingle_transport_factory.h" 55 #include "remoting/protocol/libjingle_transport_factory.h"
56 #include "third_party/libjingle/source/talk/base/helpers.h" 56 #include "third_party/libjingle/source/talk/base/helpers.h"
57 #include "third_party/libjingle/source/talk/base/ssladapter.h"
57 #include "url/gurl.h" 58 #include "url/gurl.h"
58 59
59 // Windows defines 'PostMessage', so we have to undef it. 60 // Windows defines 'PostMessage', so we have to undef it.
60 #if defined(PostMessage) 61 #if defined(PostMessage)
61 #undef PostMessage 62 #undef PostMessage
62 #endif 63 #endif
63 64
64 namespace remoting { 65 namespace remoting {
65 66
66 namespace { 67 namespace {
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 RequestFilteringInputEvents(PP_INPUTEVENT_CLASS_KEYBOARD); 239 RequestFilteringInputEvents(PP_INPUTEVENT_CLASS_KEYBOARD);
239 240
240 // Resister this instance to handle debug log messsages. 241 // Resister this instance to handle debug log messsages.
241 RegisterLoggingInstance(); 242 RegisterLoggingInstance();
242 243
243 #if defined(USE_OPENSSL) 244 #if defined(USE_OPENSSL)
244 // Initialize random seed for libjingle. It's necessary only with OpenSSL. 245 // Initialize random seed for libjingle. It's necessary only with OpenSSL.
245 char random_seed[kRandomSeedSize]; 246 char random_seed[kRandomSeedSize];
246 crypto::RandBytes(random_seed, sizeof(random_seed)); 247 crypto::RandBytes(random_seed, sizeof(random_seed));
247 talk_base::InitRandom(random_seed, sizeof(random_seed)); 248 talk_base::InitRandom(random_seed, sizeof(random_seed));
248 #endif // defined(USE_OPENSSL) 249 #elif defined(USE_NSS)
250 talk_base::InitializeSSL();
251 #endif // defined(USE_NSS)
249 252
250 // Send hello message. 253 // Send hello message.
251 scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue()); 254 scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue());
252 data->SetInteger("apiVersion", kApiVersion); 255 data->SetInteger("apiVersion", kApiVersion);
253 data->SetString("apiFeatures", kApiFeatures); 256 data->SetString("apiFeatures", kApiFeatures);
254 data->SetInteger("apiMinVersion", kApiMinMessagingVersion); 257 data->SetInteger("apiMinVersion", kApiMinMessagingVersion);
255 data->SetString("requestedCapabilities", kRequestedCapabilities); 258 data->SetString("requestedCapabilities", kRequestedCapabilities);
256 data->SetString("supportedCapabilities", kSupportedCapabilities); 259 data->SetString("supportedCapabilities", kSupportedCapabilities);
257 260
258 PostLegacyJsonMessage("hello", data.Pass()); 261 PostLegacyJsonMessage("hello", data.Pass());
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 pp::VarArrayBuffer array_buffer(buffer_size); 1178 pp::VarArrayBuffer array_buffer(buffer_size);
1176 void* data_ptr = array_buffer.Map(); 1179 void* data_ptr = array_buffer.Map();
1177 memcpy(data_ptr, buffer, buffer_size); 1180 memcpy(data_ptr, buffer, buffer_size);
1178 array_buffer.Unmap(); 1181 array_buffer.Unmap();
1179 pp::VarDictionary data_dictionary; 1182 pp::VarDictionary data_dictionary;
1180 data_dictionary.Set(pp::Var("buffer"), array_buffer); 1183 data_dictionary.Set(pp::Var("buffer"), array_buffer);
1181 PostChromotingMessage("mediaSourceData", data_dictionary); 1184 PostChromotingMessage("mediaSourceData", data_dictionary);
1182 } 1185 }
1183 1186
1184 } // namespace remoting 1187 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/protocol/libjingle_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698