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

Side by Side Diff: chrome/browser/chromeos/web_socket_proxy.cc

Issue 9476035: Make CertVerifier a pure virtual interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win shared fix Created 8 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/io_thread.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 "chrome/browser/chromeos/web_socket_proxy.h" 5 #include "chrome/browser/chromeos/web_socket_proxy.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 if (result) { 608 if (result) {
609 Shut(result); 609 Shut(result);
610 return; 610 return;
611 } 611 }
612 net::ClientSocketHandle* handle = new net::ClientSocketHandle(); 612 net::ClientSocketHandle* handle = new net::ClientSocketHandle();
613 handle->set_socket(socket_.release()); 613 handle->set_socket(socket_.release());
614 net::ClientSocketFactory* factory = 614 net::ClientSocketFactory* factory =
615 net::ClientSocketFactory::GetDefaultFactory(); 615 net::ClientSocketFactory::GetDefaultFactory();
616 net::SSLClientSocketContext ssl_context; 616 net::SSLClientSocketContext ssl_context;
617 if (!cert_verifier_.get()) 617 if (!cert_verifier_.get())
618 cert_verifier_.reset(new net::CertVerifier()); 618 cert_verifier_.reset(net::CertVerifier::CreateDefault());
619 ssl_context.cert_verifier = cert_verifier_.get(); 619 ssl_context.cert_verifier = cert_verifier_.get();
620 socket_.reset(factory->CreateSSLClientSocket( 620 socket_.reset(factory->CreateSSLClientSocket(
621 handle, host_port_pair_, ssl_config_, NULL, ssl_context)); 621 handle, host_port_pair_, ssl_config_, NULL, ssl_context));
622 if (!socket_.get()) { 622 if (!socket_.get()) {
623 LOG(WARNING) << "Failed to create an SSL client socket."; 623 LOG(WARNING) << "Failed to create an SSL client socket.";
624 OnSSLHandshakeCompleted(net::ERR_UNEXPECTED); 624 OnSSLHandshakeCompleted(net::ERR_UNEXPECTED);
625 return; 625 return;
626 } 626 }
627 result = socket_->Connect(base::Bind(&SSLChan::OnSSLHandshakeCompleted, 627 result = socket_->Connect(base::Bind(&SSLChan::OnSSLHandshakeCompleted,
628 base::Unretained(this))); 628 base::Unretained(this)));
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1898 1898
1899 void WebSocketProxy::Shutdown() { 1899 void WebSocketProxy::Shutdown() {
1900 static_cast<Serv*>(impl_)->Shutdown(); 1900 static_cast<Serv*>(impl_)->Shutdown();
1901 } 1901 }
1902 1902
1903 void WebSocketProxy::OnNetworkChange() { 1903 void WebSocketProxy::OnNetworkChange() {
1904 static_cast<Serv*>(impl_)->OnNetworkChange(); 1904 static_cast<Serv*>(impl_)->OnNetworkChange();
1905 } 1905 }
1906 1906
1907 } // namespace chromeos 1907 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698