diff options
author | Ashish Sharma <ashishsharma@google.com> | 2011-09-05 14:13:36 -0700 |
---|---|---|
committer | Ashish Sharma <ashishsharma@google.com> | 2011-09-05 14:13:36 -0700 |
commit | d65f8a80bfb27f6e91bce31ecca8e5d010d50d34 (patch) | |
tree | d15a083ed242e3b82c671b6d466ea2a0a3dbd9b9 /net | |
parent | 9eb037c1f79223822fda1b86c181948ff72fdd99 (diff) | |
download | external_chromium-d65f8a80bfb27f6e91bce31ecca8e5d010d50d34.zip external_chromium-d65f8a80bfb27f6e91bce31ecca8e5d010d50d34.tar.gz external_chromium-d65f8a80bfb27f6e91bce31ecca8e5d010d50d34.tar.bz2 |
external/chromium: Handle SSL proxy case for UID tracking.
b/5227671
Change-Id: I93bf9ca01370f727666e0d83cc442416ed035070
Diffstat (limited to 'net')
-rw-r--r-- | net/socket/ssl_client_socket_pool.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc index d0d069a..52554f8 100644 --- a/net/socket/ssl_client_socket_pool.cc +++ b/net/socket/ssl_client_socket_pool.cc @@ -74,13 +74,23 @@ bool SSLSocketParams::getUID(uid_t *uid) const { bool answer = false; switch (proxy_) { case ProxyServer::SCHEME_DIRECT: + DCHECK(transport_params_.get() != NULL); + DCHECK(http_proxy_params_.get() == NULL); + DCHECK(socks_params_.get() == NULL); + answer = transport_params_->getUID(uid); break; case ProxyServer::SCHEME_HTTP: case ProxyServer::SCHEME_HTTPS: + DCHECK(transport_params_.get() == NULL); + DCHECK(http_proxy_params_.get() != NULL); + DCHECK(socks_params_.get() == NULL); answer = http_proxy_params_->getUID(uid); break; case ProxyServer::SCHEME_SOCKS4: case ProxyServer::SCHEME_SOCKS5: + DCHECK(transport_params_.get() == NULL); + DCHECK(http_proxy_params_.get() == NULL); + DCHECK(socks_params_.get() != NULL); answer = socks_params_->getUID(uid); break; default: @@ -326,7 +336,7 @@ int SSLConnectJob::DoSSLConnect() { #ifdef ANDROID uid_t calling_uid = 0; - bool valid_uid = params_->transport_params()->getUID(&calling_uid); + bool valid_uid = params_->getUID(&calling_uid); #endif return ssl_socket_->Connect(&callback_ |