Chromium Code Reviews| Index: chrome/browser/io_thread.cc |
| diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc |
| index a97a732defdbac634cb85249a145f97c75aaafe9..2a33c42f8c943d053cd3067a40b76503ea0caa25 100644 |
| --- a/chrome/browser/io_thread.cc |
| +++ b/chrome/browser/io_thread.cc |
| @@ -94,12 +94,14 @@ |
| #include "net/ocsp/nss_ocsp.h" |
| #endif |
| -#if defined(OS_ANDROID) || defined(OS_IOS) |
| +#if defined(SPDY_PROXY_AUTH_ORIGIN) |
| +#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
| +#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.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_protocol.h" |
| -#include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.h" |
| -#endif |
| + |
| +using data_reduction_proxy::DataReductionProxyParams; |
| +#endif // defined(SPDY_PROXY_AUTH_ORIGIN) |
| #if defined(OS_CHROMEOS) |
| #include "chrome/browser/chromeos/login/users/user_manager.h" |
| @@ -109,13 +111,6 @@ |
| 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; |
| // The IOThread object must outlive any tasks posted to the IO thread before the |
| @@ -639,36 +634,31 @@ 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; |
| if (DataReductionProxyParams::IsIncludedInAlternativeFieldTrial()) |
| drp_flags |= DataReductionProxyParams::kAlternativeAllowed; |
| - if (DataReductionProxyParams::IsIncludedInPromoFieldTrial()) |
| - drp_flags |= DataReductionProxyParams::kPromoAllowed; |
| - DataReductionProxyParams* proxy_params = |
| - new DataReductionProxyParams(drp_flags); |
| - globals_->data_reduction_proxy_params.reset(proxy_params); |
| + globals_->data_reduction_proxy_params.reset( |
| + new DataReductionProxyParams(drp_flags)); |
|
willchan no longer on Chromium
2014/07/29 00:26:56
Can you get rid of the using declaration above and
bengr
2014/07/29 21:29:52
Done.
|
| globals_->data_reduction_proxy_auth_request_handler.reset( |
| - new DataReductionProxyAuthRequestHandler(proxy_params)); |
| - globals_->on_resolve_proxy_handler = |
| - ChromeNetworkDelegate::OnResolveProxyHandler( |
| - base::Bind(data_reduction_proxy::OnResolveProxyHandler)); |
| - DataReductionProxyUsageStats* proxy_usage_stats = |
| - new DataReductionProxyUsageStats(proxy_params, |
| - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
| - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
| - network_delegate->set_data_reduction_proxy_params(proxy_params); |
| - globals_->data_reduction_proxy_usage_stats.reset(proxy_usage_stats); |
| - network_delegate->set_data_reduction_proxy_usage_stats(proxy_usage_stats); |
| + new data_reduction_proxy::DataReductionProxyAuthRequestHandler( |
| + globals_->data_reduction_proxy_params.get(), |
| + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); |
| + |
| + // This is the same as in ProfileImplIOData except that we do not collect |
| + // usage stats. |
| + network_delegate->set_data_reduction_proxy_params( |
| + globals_->data_reduction_proxy_params.get()); |
| network_delegate->set_data_reduction_proxy_auth_request_handler( |
| globals_->data_reduction_proxy_auth_request_handler.get()); |
| network_delegate->set_on_resolve_proxy_handler( |
| - globals_->on_resolve_proxy_handler); |
| + base::Bind(data_reduction_proxy::OnResolveProxyHandler)); |
| #endif // defined(SPDY_PROXY_AUTH_ORIGIN) |
| -#endif // defined(OS_ANDROID) || defined(OS_IOS) |
| + |
| + |
|
willchan no longer on Chromium
2014/07/29 00:26:56
Can you delete this vertical whitespace? I general
bengr
2014/07/29 21:29:52
Done.
|
| globals_->http_auth_handler_factory.reset(CreateDefaultAuthHandlerFactory( |
| globals_->host_resolver.get())); |
| globals_->http_server_properties.reset(new net::HttpServerPropertiesImpl()); |