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

Side by Side Diff: jingle/glue/xmpp_client_socket_factory.cc

Issue 2104493002: Fixup ChromeOS enrollment and renderer p2p sockets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Copypasta Created 4 years, 5 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 | « content/browser/renderer_host/p2p/socket_host_tcp.cc ('k') | no next file » | 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 "jingle/glue/xmpp_client_socket_factory.h" 5 #include "jingle/glue/xmpp_client_socket_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "jingle/glue/fake_ssl_client_socket.h" 10 #include "jingle/glue/fake_ssl_client_socket.h"
(...skipping 30 matching lines...) Expand all
41 return (use_fake_ssl_client_socket_ 41 return (use_fake_ssl_client_socket_
42 ? std::unique_ptr<net::StreamSocket>( 42 ? std::unique_ptr<net::StreamSocket>(
43 new FakeSSLClientSocket(std::move(transport_socket))) 43 new FakeSSLClientSocket(std::move(transport_socket)))
44 : std::move(transport_socket)); 44 : std::move(transport_socket));
45 } 45 }
46 46
47 std::unique_ptr<net::SSLClientSocket> 47 std::unique_ptr<net::SSLClientSocket>
48 XmppClientSocketFactory::CreateSSLClientSocket( 48 XmppClientSocketFactory::CreateSSLClientSocket(
49 std::unique_ptr<net::ClientSocketHandle> transport_socket, 49 std::unique_ptr<net::ClientSocketHandle> transport_socket,
50 const net::HostPortPair& host_and_port) { 50 const net::HostPortPair& host_and_port) {
51 net::SSLClientSocketContext context; 51 const net::URLRequestContext* url_context =
52 context.cert_verifier = 52 request_context_getter_->GetURLRequestContext();
53 request_context_getter_->GetURLRequestContext()->cert_verifier(); 53 net::SSLClientSocketContext context(
54 context.transport_security_state = request_context_getter_-> 54 url_context->cert_verifier(),
55 GetURLRequestContext()->transport_security_state(); 55 nullptr, /* TODO(rkn): ChannelIDService is not thread safe. */
56 DCHECK(context.transport_security_state); 56 url_context->transport_security_state(),
57 // TODO(rkn): context.channel_id_service is NULL because the 57 url_context->cert_transparency_verifier(),
58 // ChannelIDService class is not thread safe. 58 url_context->ct_policy_enforcer(),
59 std::string() /* TODO(rsleevi): Ensure a proper unique shard. */);
59 return client_socket_factory_->CreateSSLClientSocket( 60 return client_socket_factory_->CreateSSLClientSocket(
60 std::move(transport_socket), host_and_port, ssl_config_, context); 61 std::move(transport_socket), host_and_port, ssl_config_, context);
61 } 62 }
62 63
63 64
64 } // namespace jingle_glue 65 } // namespace jingle_glue
OLDNEW
« no previous file with comments | « content/browser/renderer_host/p2p/socket_host_tcp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698