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

Side by Side Diff: net/socket/ssl_client_socket_pool.cc

Issue 511163002: Net-related fixups for scoped_refptr conversion operator cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix naming to match Created 6 years, 3 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 | « net/socket/ssl_client_socket_openssl.cc ('k') | net/websockets/websocket_inflater_test.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 "net/socket/ssl_client_socket_pool.h" 5 #include "net/socket/ssl_client_socket_pool.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 28 matching lines...) Expand all
39 : direct_params_(direct_params), 39 : direct_params_(direct_params),
40 socks_proxy_params_(socks_proxy_params), 40 socks_proxy_params_(socks_proxy_params),
41 http_proxy_params_(http_proxy_params), 41 http_proxy_params_(http_proxy_params),
42 host_and_port_(host_and_port), 42 host_and_port_(host_and_port),
43 ssl_config_(ssl_config), 43 ssl_config_(ssl_config),
44 privacy_mode_(privacy_mode), 44 privacy_mode_(privacy_mode),
45 load_flags_(load_flags), 45 load_flags_(load_flags),
46 force_spdy_over_ssl_(force_spdy_over_ssl), 46 force_spdy_over_ssl_(force_spdy_over_ssl),
47 want_spdy_over_npn_(want_spdy_over_npn), 47 want_spdy_over_npn_(want_spdy_over_npn),
48 ignore_limits_(false) { 48 ignore_limits_(false) {
49 if (direct_params_) { 49 if (direct_params_.get()) {
50 DCHECK(!socks_proxy_params_); 50 DCHECK(!socks_proxy_params_.get());
51 DCHECK(!http_proxy_params_); 51 DCHECK(!http_proxy_params_.get());
52 ignore_limits_ = direct_params_->ignore_limits(); 52 ignore_limits_ = direct_params_->ignore_limits();
53 } else if (socks_proxy_params_) { 53 } else if (socks_proxy_params_.get()) {
54 DCHECK(!http_proxy_params_); 54 DCHECK(!http_proxy_params_.get());
55 ignore_limits_ = socks_proxy_params_->ignore_limits(); 55 ignore_limits_ = socks_proxy_params_->ignore_limits();
56 } else { 56 } else {
57 DCHECK(http_proxy_params_); 57 DCHECK(http_proxy_params_.get());
58 ignore_limits_ = http_proxy_params_->ignore_limits(); 58 ignore_limits_ = http_proxy_params_->ignore_limits();
59 } 59 }
60 } 60 }
61 61
62 SSLSocketParams::~SSLSocketParams() {} 62 SSLSocketParams::~SSLSocketParams() {}
63 63
64 SSLSocketParams::ConnectionType SSLSocketParams::GetConnectionType() const { 64 SSLSocketParams::ConnectionType SSLSocketParams::GetConnectionType() const {
65 if (direct_params_) { 65 if (direct_params_.get()) {
66 DCHECK(!socks_proxy_params_); 66 DCHECK(!socks_proxy_params_.get());
67 DCHECK(!http_proxy_params_); 67 DCHECK(!http_proxy_params_.get());
68 return DIRECT; 68 return DIRECT;
69 } 69 }
70 70
71 if (socks_proxy_params_) { 71 if (socks_proxy_params_.get()) {
72 DCHECK(!http_proxy_params_); 72 DCHECK(!http_proxy_params_.get());
73 return SOCKS_PROXY; 73 return SOCKS_PROXY;
74 } 74 }
75 75
76 DCHECK(http_proxy_params_); 76 DCHECK(http_proxy_params_.get());
77 return HTTP_PROXY; 77 return HTTP_PROXY;
78 } 78 }
79 79
80 const scoped_refptr<TransportSocketParams>& 80 const scoped_refptr<TransportSocketParams>&
81 SSLSocketParams::GetDirectConnectionParams() const { 81 SSLSocketParams::GetDirectConnectionParams() const {
82 DCHECK_EQ(GetConnectionType(), DIRECT); 82 DCHECK_EQ(GetConnectionType(), DIRECT);
83 return direct_params_; 83 return direct_params_;
84 } 84 }
85 85
86 const scoped_refptr<SOCKSSocketParams>& 86 const scoped_refptr<SOCKSSocketParams>&
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 CHECK(it != messenger_map_.end()); 854 CHECK(it != messenger_map_.end());
855 delete it->second; 855 delete it->second;
856 messenger_map_.erase(it); 856 messenger_map_.erase(it);
857 } 857 }
858 858
859 void SSLClientSocketPool::OnSSLConfigChanged() { 859 void SSLClientSocketPool::OnSSLConfigChanged() {
860 FlushWithError(ERR_NETWORK_CHANGED); 860 FlushWithError(ERR_NETWORK_CHANGED);
861 } 861 }
862 862
863 } // namespace net 863 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_openssl.cc ('k') | net/websockets/websocket_inflater_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698