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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 335083002: Add data reduction proxy bypass logic to system profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@flywheel-refactor-net-fake-a-redirect-response-headers
Patch Set: Addressed comment Created 6 years, 6 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 | « no previous file | no next file » | 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/io_thread.h" 5 #include "chrome/browser/io_thread.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 #if defined(SPDY_PROXY_AUTH_ORIGIN) 600 #if defined(SPDY_PROXY_AUTH_ORIGIN)
601 int drp_flags = DataReductionProxyParams::kFallbackAllowed; 601 int drp_flags = DataReductionProxyParams::kFallbackAllowed;
602 if (DataReductionProxyParams::IsIncludedInFieldTrial()) 602 if (DataReductionProxyParams::IsIncludedInFieldTrial())
603 drp_flags |= DataReductionProxyParams::kAllowed; 603 drp_flags |= DataReductionProxyParams::kAllowed;
604 if (DataReductionProxyParams::IsIncludedInAlternativeFieldTrial()) 604 if (DataReductionProxyParams::IsIncludedInAlternativeFieldTrial())
605 drp_flags |= DataReductionProxyParams::kAlternativeAllowed; 605 drp_flags |= DataReductionProxyParams::kAlternativeAllowed;
606 if (DataReductionProxyParams::IsIncludedInPromoFieldTrial()) 606 if (DataReductionProxyParams::IsIncludedInPromoFieldTrial())
607 drp_flags |= DataReductionProxyParams::kPromoAllowed; 607 drp_flags |= DataReductionProxyParams::kPromoAllowed;
608 globals_->data_reduction_proxy_params.reset( 608 globals_->data_reduction_proxy_params.reset(
609 new DataReductionProxyParams(drp_flags)); 609 new DataReductionProxyParams(drp_flags));
610 network_delegate->set_data_reduction_proxy_params(
611 globals_->data_reduction_proxy_params.get());
610 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) 612 #endif // defined(SPDY_PROXY_AUTH_ORIGIN)
611 #endif // defined(OS_ANDROID) || defined(OS_IOS) 613 #endif // defined(OS_ANDROID) || defined(OS_IOS)
612 globals_->http_auth_handler_factory.reset(CreateDefaultAuthHandlerFactory( 614 globals_->http_auth_handler_factory.reset(CreateDefaultAuthHandlerFactory(
613 globals_->host_resolver.get())); 615 globals_->host_resolver.get()));
614 globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl()); 616 globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl());
615 // For the ProxyScriptFetcher, we use a direct ProxyService. 617 // For the ProxyScriptFetcher, we use a direct ProxyService.
616 globals_->proxy_script_fetcher_proxy_service.reset( 618 globals_->proxy_script_fetcher_proxy_service.reset(
617 net::ProxyService::CreateDirectWithNetLog(net_log_)); 619 net::ProxyService::CreateDirectWithNetLog(net_log_));
618 // In-memory cookie store. 620 // In-memory cookie store.
619 globals_->system_cookie_store = 621 globals_->system_cookie_store =
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 std::string version_flag = 1218 std::string version_flag =
1217 command_line.GetSwitchValueASCII(switches::kQuicVersion); 1219 command_line.GetSwitchValueASCII(switches::kQuicVersion);
1218 for (size_t i = 0; i < supported_versions.size(); ++i) { 1220 for (size_t i = 0; i < supported_versions.size(); ++i) {
1219 net::QuicVersion version = supported_versions[i]; 1221 net::QuicVersion version = supported_versions[i];
1220 if (net::QuicVersionToString(version) == version_flag) { 1222 if (net::QuicVersionToString(version) == version_flag) {
1221 return version; 1223 return version;
1222 } 1224 }
1223 } 1225 }
1224 return net::QUIC_VERSION_UNSUPPORTED; 1226 return net::QUIC_VERSION_UNSUPPORTED;
1225 } 1227 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698