Index: chrome/browser/io_thread.cc |
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc |
index 97b602f6c5c6083af810b42fa349aa8e241198bf..b7b4f3e1ff89b55e5e01204d392121062cf1b766 100644 |
--- a/chrome/browser/io_thread.cc |
+++ b/chrome/browser/io_thread.cc |
@@ -39,7 +39,11 @@ |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/chrome_version_info.h" |
#include "chrome/common/pref_names.h" |
+#include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h" |
+#include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" |
#include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h" |
+#include "components/data_reduction_proxy/browser/data_reduction_proxy_protocol.h" |
+#include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.h" |
#include "components/policy/core/common/policy_service.h" |
#include "components/variations/variations_associated_data.h" |
#include "content/public/browser/browser_thread.h" |
@@ -94,13 +98,6 @@ |
#include "net/ocsp/nss_ocsp.h" |
#endif |
-#if defined(OS_ANDROID) || defined(OS_IOS) |
-#include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h" |
-#include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" |
-#include "components/data_reduction_proxy/browser/data_reduction_proxy_protocol.h" |
-#include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.h" |
-#endif |
- |
#if defined(OS_CHROMEOS) |
#include "chrome/browser/chromeos/login/users/user_manager.h" |
#include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" |
@@ -108,13 +105,10 @@ |
#endif |
using content::BrowserThread; |
- |
-#if defined(OS_ANDROID) || defined(OS_IOS) |
using data_reduction_proxy::DataReductionProxyAuthRequestHandler; |
using data_reduction_proxy::DataReductionProxyParams; |
using data_reduction_proxy::DataReductionProxyUsageStats; |
using data_reduction_proxy::DataReductionProxySettings; |
-#endif |
class SafeBrowsingURLRequestContext; |
@@ -638,11 +632,13 @@ void IOThread::InitAsync() { |
} |
#endif |
globals_->ssl_config_service = GetSSLConfigService(); |
-#if defined(OS_ANDROID) || defined(OS_IOS) |
-#if defined(SPDY_PROXY_AUTH_ORIGIN) |
- int drp_flags = DataReductionProxyParams::kFallbackAllowed; |
- if (DataReductionProxyParams::IsIncludedInFieldTrial()) |
- drp_flags |= DataReductionProxyParams::kAllowed; |
+ int drp_flags = 0; |
+ // TODO(kundaji): Gate instantitation of all data reduction classes based |
+ // on this method. |
+ if (DataReductionProxyParams::IsIncludedInFieldTrial()) { |
bengr
2014/07/21 22:45:14
Please test that the code works when not part of t
Not at Google. Contact bengr
2014/07/22 00:12:09
Good catch. Made other flags conditional on kAllow
|
+ drp_flags = DataReductionProxyParams::kAllowed | |
+ DataReductionProxyParams::kFallbackAllowed; |
+ } |
if (DataReductionProxyParams::IsIncludedInAlternativeFieldTrial()) |
bengr
2014/07/21 22:45:14
We are accumulating a lot of code here. Would you
Not at Google. Contact bengr
2014/07/22 00:12:09
Done.
|
drp_flags |= DataReductionProxyParams::kAlternativeAllowed; |
if (DataReductionProxyParams::IsIncludedInPromoFieldTrial()) |
@@ -666,8 +662,6 @@ void IOThread::InitAsync() { |
globals_->data_reduction_proxy_auth_request_handler.get()); |
network_delegate->set_on_resolve_proxy_handler( |
globals_->on_resolve_proxy_handler); |
-#endif // defined(SPDY_PROXY_AUTH_ORIGIN) |
-#endif // defined(OS_ANDROID) || defined(OS_IOS) |
globals_->http_auth_handler_factory.reset(CreateDefaultAuthHandlerFactory( |
globals_->host_resolver.get())); |
globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl()); |
@@ -1104,6 +1098,10 @@ void IOThread::InitSystemRequestContextOnIOThread() { |
system_proxy_config_service_.release(), |
command_line, |
quick_check_enabled_.GetValue())); |
+ DCHECK(globals_->data_reduction_proxy_params); |
+ globals_->system_proxy_service->SetDataReductionProxyOrigins( |
bengr
2014/07/21 22:45:14
Add a comment that this is temporary until the his
Not at Google. Contact bengr
2014/07/22 00:12:09
Acknowledged.
|
+ globals_->data_reduction_proxy_params->GetDefaultOrigin(), |
+ globals_->data_reduction_proxy_params->GetDefaultFallbackOrigin()); |
net::HttpNetworkSession::Params system_params; |
InitializeNetworkSessionParams(&system_params); |