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

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

Issue 332313003: Add Finch experiment for selectively bypassing proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: somehow missed a chromeos ResolveProxy invocation 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
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.h ('k') | chrome/browser/net/network_stats.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/net/chrome_network_delegate.h" 5 #include "chrome/browser/net/chrome_network_delegate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 468
469 if (force_safe_search && rv == net::OK && new_url->is_empty()) 469 if (force_safe_search && rv == net::OK && new_url->is_empty())
470 ForceGoogleSafeSearch(request, new_url); 470 ForceGoogleSafeSearch(request, new_url);
471 471
472 if (connect_interceptor_) 472 if (connect_interceptor_)
473 connect_interceptor_->WitnessURLRequest(request); 473 connect_interceptor_->WitnessURLRequest(request);
474 474
475 return rv; 475 return rv;
476 } 476 }
477 477
478 void ChromeNetworkDelegate::OnResolveProxy(
479 const GURL& url, int load_flags, net::ProxyInfo* result) {
480 if (!on_resolve_proxy_handler_.is_null()) {
481 on_resolve_proxy_handler_.Run(url, load_flags,
482 data_reduction_proxy_params_, result);
483 }
484 }
485
478 int ChromeNetworkDelegate::OnBeforeSendHeaders( 486 int ChromeNetworkDelegate::OnBeforeSendHeaders(
479 net::URLRequest* request, 487 net::URLRequest* request,
480 const net::CompletionCallback& callback, 488 const net::CompletionCallback& callback,
481 net::HttpRequestHeaders* headers) { 489 net::HttpRequestHeaders* headers) {
482 TRACE_EVENT_ASYNC_STEP_PAST0("net", "URLRequest", request, "SendRequest"); 490 TRACE_EVENT_ASYNC_STEP_PAST0("net", "URLRequest", request, "SendRequest");
483 return extensions_delegate_->OnBeforeSendHeaders(request, callback, headers); 491 return extensions_delegate_->OnBeforeSendHeaders(request, callback, headers);
484 } 492 }
485 493
486 void ChromeNetworkDelegate::OnBeforeSendProxyHeaders( 494 void ChromeNetworkDelegate::OnBeforeSendProxyHeaders(
487 net::URLRequest* request, 495 net::URLRequest* request,
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 data_reduction_proxy::DataReductionProxyRequestType request_type) { 833 data_reduction_proxy::DataReductionProxyRequestType request_type) {
826 DCHECK_GE(received_content_length, 0); 834 DCHECK_GE(received_content_length, 0);
827 DCHECK_GE(original_content_length, 0); 835 DCHECK_GE(original_content_length, 0);
828 StoreAccumulatedContentLength(received_content_length, 836 StoreAccumulatedContentLength(received_content_length,
829 original_content_length, 837 original_content_length,
830 request_type, 838 request_type,
831 reinterpret_cast<Profile*>(profile_)); 839 reinterpret_cast<Profile*>(profile_));
832 received_content_length_ += received_content_length; 840 received_content_length_ += received_content_length;
833 original_content_length_ += original_content_length; 841 original_content_length_ += original_content_length;
834 } 842 }
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.h ('k') | chrome/browser/net/network_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698