| OLD | NEW |
| 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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 on_resolve_proxy_handler_.Run(url, load_flags, | 451 on_resolve_proxy_handler_.Run(url, load_flags, |
| 452 proxy_config_getter_.Run(), | 452 proxy_config_getter_.Run(), |
| 453 proxy_service.proxy_retry_info(), | 453 proxy_service.proxy_retry_info(), |
| 454 data_reduction_proxy_params_, result); | 454 data_reduction_proxy_params_, result); |
| 455 } | 455 } |
| 456 } | 456 } |
| 457 | 457 |
| 458 void ChromeNetworkDelegate::OnProxyFallback(const net::ProxyServer& bad_proxy, | 458 void ChromeNetworkDelegate::OnProxyFallback(const net::ProxyServer& bad_proxy, |
| 459 int net_error) { | 459 int net_error) { |
| 460 if (data_reduction_proxy_usage_stats_) { | 460 if (data_reduction_proxy_usage_stats_) { |
| 461 data_reduction_proxy_usage_stats_->RecordBypassEventHistograms( | 461 data_reduction_proxy_usage_stats_->OnProxyFallback( |
| 462 bad_proxy, net_error); | 462 bad_proxy, net_error); |
| 463 } | 463 } |
| 464 } | 464 } |
| 465 | 465 |
| 466 int ChromeNetworkDelegate::OnBeforeSendHeaders( | 466 int ChromeNetworkDelegate::OnBeforeSendHeaders( |
| 467 net::URLRequest* request, | 467 net::URLRequest* request, |
| 468 const net::CompletionCallback& callback, | 468 const net::CompletionCallback& callback, |
| 469 net::HttpRequestHeaders* headers) { | 469 net::HttpRequestHeaders* headers) { |
| 470 bool force_safe_search = force_google_safe_search_ && | 470 bool force_safe_search = force_google_safe_search_ && |
| 471 force_google_safe_search_->GetValue(); | 471 force_google_safe_search_->GetValue(); |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 if (data_reduction_proxy_statistics_prefs_) { | 843 if (data_reduction_proxy_statistics_prefs_) { |
| 844 StoreAccumulatedContentLength(received_content_length, | 844 StoreAccumulatedContentLength(received_content_length, |
| 845 original_content_length, | 845 original_content_length, |
| 846 request_type, | 846 request_type, |
| 847 reinterpret_cast<Profile*>(profile_), | 847 reinterpret_cast<Profile*>(profile_), |
| 848 data_reduction_proxy_statistics_prefs_); | 848 data_reduction_proxy_statistics_prefs_); |
| 849 } | 849 } |
| 850 received_content_length_ += received_content_length; | 850 received_content_length_ += received_content_length; |
| 851 original_content_length_ += original_content_length; | 851 original_content_length_ += original_content_length; |
| 852 } | 852 } |
| OLD | NEW |