| Index: chrome/browser/profiles/profile_io_data.h
|
| diff --git a/chrome/browser/profiles/profile_io_data.h b/chrome/browser/profiles/profile_io_data.h
|
| index 244107f4e39bf987b1b1366e9a241e45170bb2dc..3d448285c6ce86a15accdff19ebef316bedf5546 100644
|
| --- a/chrome/browser/profiles/profile_io_data.h
|
| +++ b/chrome/browser/profiles/profile_io_data.h
|
| @@ -19,14 +19,10 @@
|
| #include "base/synchronization/lock.h"
|
| #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
|
| #include "chrome/browser/io_thread.h"
|
| -#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/profiles/storage_partition_descriptor.h"
|
| #include "components/content_settings/core/common/content_settings_types.h"
|
| -#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_auth_request_handler.h"
|
| -#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h"
|
| -#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.h"
|
| -#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h"
|
| +#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h"
|
| #include "content/public/browser/content_browser_client.h"
|
| #include "content/public/browser/resource_context.h"
|
| #include "net/cookies/cookie_monster.h"
|
| @@ -50,6 +46,10 @@ namespace chrome_browser_net {
|
| class ResourcePrefetchPredictorObserver;
|
| }
|
|
|
| +namespace data_reduction_proxy {
|
| +class DataReductionProxyIOData;
|
| +}
|
| +
|
| namespace extensions {
|
| class InfoMap;
|
| }
|
| @@ -254,15 +254,15 @@ class ProfileIOData {
|
| // should only be called from there.
|
| bool GetMetricsEnabledStateOnIOThread() const;
|
|
|
| - // Returns whether or not data reduction proxy is enabled in the browser
|
| - // instance on which this profile resides.
|
| - virtual bool IsDataReductionProxyEnabled() const;
|
| -
|
| void set_client_cert_store_factory_for_testing(
|
| const base::Callback<scoped_ptr<net::ClientCertStore>()>& factory) {
|
| client_cert_store_factory_ = factory;
|
| }
|
|
|
| + bool IsDataReductionProxyEnabled() {
|
| + return data_reduction_proxy_io_data()->IsEnabled();
|
| + }
|
| +
|
| protected:
|
| // A URLRequestContext for media that owns its HTTP factory, to ensure
|
| // it is deleted.
|
| @@ -371,84 +371,13 @@ class ProfileIOData {
|
| void set_channel_id_service(
|
| net::ChannelIDService* channel_id_service) const;
|
|
|
| - data_reduction_proxy::DataReductionProxyParams* data_reduction_proxy_params()
|
| - const {
|
| - return data_reduction_proxy_params_.get();
|
| - }
|
| -
|
| - void set_data_reduction_proxy_params(
|
| - scoped_ptr<data_reduction_proxy::DataReductionProxyParams>
|
| - data_reduction_proxy_params) const {
|
| - data_reduction_proxy_params_ = data_reduction_proxy_params.Pass();
|
| - }
|
| -
|
| - data_reduction_proxy::DataReductionProxyUsageStats*
|
| - data_reduction_proxy_usage_stats() const {
|
| - return data_reduction_proxy_usage_stats_.get();
|
| - }
|
| -
|
| - void set_data_reduction_proxy_statistics_prefs(
|
| - scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs>
|
| - data_reduction_proxy_statistics_prefs) {
|
| - data_reduction_proxy_statistics_prefs_ =
|
| - data_reduction_proxy_statistics_prefs.Pass();
|
| - }
|
| -
|
| - data_reduction_proxy::DataReductionProxyStatisticsPrefs*
|
| - data_reduction_proxy_statistics_prefs() const {
|
| - return data_reduction_proxy_statistics_prefs_.get();
|
| - }
|
| -
|
| - void set_data_reduction_proxy_usage_stats(
|
| - scoped_ptr<data_reduction_proxy::DataReductionProxyUsageStats>
|
| - data_reduction_proxy_usage_stats) const {
|
| - data_reduction_proxy_usage_stats_ =
|
| - data_reduction_proxy_usage_stats.Pass();
|
| - }
|
| -
|
| - base::Callback<void(bool)> data_reduction_proxy_unavailable_callback() const {
|
| - return data_reduction_proxy_unavailable_callback_;
|
| - }
|
| -
|
| - void set_data_reduction_proxy_unavailable_callback(
|
| - const base::Callback<void(bool)>& unavailable_callback) const {
|
| - data_reduction_proxy_unavailable_callback_ = unavailable_callback;
|
| - }
|
| -
|
| - DataReductionProxyChromeConfigurator*
|
| - data_reduction_proxy_chrome_configurator() const {
|
| - return data_reduction_proxy_chrome_configurator_.get();
|
| - }
|
| -
|
| - void set_data_reduction_proxy_chrome_configurator(
|
| - scoped_ptr<DataReductionProxyChromeConfigurator>
|
| - data_reduction_proxy_chrome_configurator) const {
|
| - data_reduction_proxy_chrome_configurator_ =
|
| - data_reduction_proxy_chrome_configurator.Pass();
|
| - }
|
| -
|
| - data_reduction_proxy::DataReductionProxyAuthRequestHandler*
|
| - data_reduction_proxy_auth_request_handler() const {
|
| - return data_reduction_proxy_auth_request_handler_.get();
|
| - }
|
| -
|
| - void set_data_reduction_proxy_auth_request_handler(
|
| - scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler>
|
| - data_reduction_proxy_auth_request_handler) const {
|
| - data_reduction_proxy_auth_request_handler_ =
|
| - data_reduction_proxy_auth_request_handler.Pass();
|
| - }
|
| -
|
| - data_reduction_proxy::DataReductionProxyEventStore*
|
| - data_reduction_proxy_event_store() const {
|
| - return data_reduction_proxy_event_store_.get();
|
| - }
|
| + void set_data_reduction_proxy_io_data(
|
| + scoped_ptr<data_reduction_proxy::DataReductionProxyIOData>
|
| + data_reduction_proxy_io_data) const;
|
|
|
| - void set_data_reduction_proxy_event_store(
|
| - scoped_ptr<data_reduction_proxy::DataReductionProxyEventStore>
|
| - data_reduction_proxy_event_store) const {
|
| - data_reduction_proxy_event_store_ =
|
| - data_reduction_proxy_event_store.Pass();
|
| + data_reduction_proxy::DataReductionProxyIOData*
|
| + data_reduction_proxy_io_data() const {
|
| + return data_reduction_proxy_io_data_.get();
|
| }
|
|
|
| net::FraudulentCertificateReporter* fraudulent_certificate_reporter() const {
|
| @@ -650,23 +579,8 @@ class ProfileIOData {
|
| #endif
|
| mutable scoped_ptr<net::ChannelIDService> channel_id_service_;
|
|
|
| - // data_reduction_proxy_* classes must be declared before |network_delegate_|.
|
| - // The data_reduction_proxy_* classes are passed in to |network_delegate_|,
|
| - // so this ordering ensures that the |network_delegate_| never references
|
| - // freed objects.
|
| - mutable scoped_ptr<data_reduction_proxy::DataReductionProxyParams>
|
| - data_reduction_proxy_params_;
|
| - mutable scoped_ptr<data_reduction_proxy::DataReductionProxyUsageStats>
|
| - data_reduction_proxy_usage_stats_;
|
| - mutable scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs>
|
| - data_reduction_proxy_statistics_prefs_;
|
| - mutable base::Callback<void(bool)> data_reduction_proxy_unavailable_callback_;
|
| - mutable scoped_ptr<DataReductionProxyChromeConfigurator>
|
| - data_reduction_proxy_chrome_configurator_;
|
| - mutable scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler>
|
| - data_reduction_proxy_auth_request_handler_;
|
| - mutable scoped_ptr<data_reduction_proxy::DataReductionProxyEventStore>
|
| - data_reduction_proxy_event_store_;
|
| + mutable scoped_ptr<data_reduction_proxy::DataReductionProxyIOData>
|
| + data_reduction_proxy_io_data_;
|
|
|
| mutable scoped_ptr<net::FraudulentCertificateReporter>
|
| fraudulent_certificate_reporter_;
|
|
|