diff options
author | Ashish Sharma <ashishsharma@google.com> | 2011-09-06 10:27:25 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-09-06 10:27:25 -0700 |
commit | d8b3e76734b4fcc2d678351d180be3ae786716a7 (patch) | |
tree | 51fea345c62aa60e60933d2f6ff60d48f8473deb /net | |
parent | 61de58ae4765bcc6059940aa310413bdda305b5a (diff) | |
parent | d65f8a80bfb27f6e91bce31ecca8e5d010d50d34 (diff) | |
download | external_chromium-d8b3e76734b4fcc2d678351d180be3ae786716a7.zip external_chromium-d8b3e76734b4fcc2d678351d180be3ae786716a7.tar.gz external_chromium-d8b3e76734b4fcc2d678351d180be3ae786716a7.tar.bz2 |
Merge "external/chromium: Handle SSL proxy case for UID tracking. b/5227671"
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_ |