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

Side by Side Diff: chrome/browser/net/network_stats.cc

Issue 332313003: Add Finch experiment for selectively bypassing proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2-line change: Add missing ifdef(SPDY_PROXY_AUTH_ORIGIN); previously only compiled on android, but … Created 6 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/net/network_stats.h" 5 #include "chrome/browser/net/network_stats.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 813
814 void ProxyDetector::StartResolveProxy() { 814 void ProxyDetector::StartResolveProxy() {
815 std::string url = 815 std::string url =
816 base::StringPrintf("https://%s", server_address_.ToString().c_str()); 816 base::StringPrintf("https://%s", server_address_.ToString().c_str());
817 GURL gurl(url); 817 GURL gurl(url);
818 818
819 has_pending_proxy_resolution_ = true; 819 has_pending_proxy_resolution_ = true;
820 DCHECK(proxy_service_); 820 DCHECK(proxy_service_);
821 int rv = proxy_service_->ResolveProxy( 821 int rv = proxy_service_->ResolveProxy(
822 gurl, 822 gurl,
823 0,
mmenke 2014/07/01 19:45:12 LOAD_NORMAL.
rcs 2014/07/02 00:56:20 Done.
823 &proxy_info_, 824 &proxy_info_,
824 base::Bind(&ProxyDetector::OnResolveProxyComplete, 825 base::Bind(&ProxyDetector::OnResolveProxyComplete,
825 base::Unretained(this)), 826 base::Unretained(this)),
826 NULL, 827 NULL,
828 NULL,
827 net::BoundNetLog()); 829 net::BoundNetLog());
828 if (rv != net::ERR_IO_PENDING) 830 if (rv != net::ERR_IO_PENDING)
829 OnResolveProxyComplete(rv); 831 OnResolveProxyComplete(rv);
830 } 832 }
831 833
832 void ProxyDetector::OnResolveProxyComplete(int result) { 834 void ProxyDetector::OnResolveProxyComplete(int result) {
833 has_pending_proxy_resolution_ = false; 835 has_pending_proxy_resolution_ = false;
834 bool has_proxy_server = 836 bool has_proxy_server =
835 (result == net::OK && proxy_info_.proxy_server().is_valid() && 837 (result == net::OK && proxy_info_.proxy_server().is_valid() &&
836 !proxy_info_.proxy_server().is_direct()); 838 !proxy_info_.proxy_server().is_direct());
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 udp_stats_client->Start(host_resolver, 949 udp_stats_client->Start(host_resolver,
948 server_address, 950 server_address,
949 histogram_port, 951 histogram_port,
950 has_proxy_server, 952 has_proxy_server,
951 kProbePacketBytes[probe_choice], 953 kProbePacketBytes[probe_choice],
952 bytes_for_packet_size_test, 954 bytes_for_packet_size_test,
953 net::CompletionCallback()); 955 net::CompletionCallback());
954 } 956 }
955 957
956 } // namespace chrome_browser_net 958 } // namespace chrome_browser_net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698