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

Unified Diff: chrome/browser/profiles/profile_io_data.h

Issue 778463002: Wrapped data reduction proxy initialization into its own class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@network-delegate
Patch Set: Updated test Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 966e86b3b7ae3fca755c43497010f2c8ab3c656b..23ce4348586d44130a396c5003d265c4baa8065d 100644
--- a/chrome/browser/profiles/profile_io_data.h
+++ b/chrome/browser/profiles/profile_io_data.h
@@ -22,11 +22,6 @@
#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_configurator.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 "content/public/browser/content_browser_client.h"
#include "content/public/browser/resource_context.h"
#include "net/cookies/cookie_monster.h"
@@ -50,6 +45,10 @@ namespace chrome_browser_net {
class ResourcePrefetchPredictorObserver;
}
+namespace data_reduction_proxy {
+class DataReductionProxyIOData;
+}
+
namespace extensions {
class InfoMap;
}
@@ -250,15 +249,13 @@ 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() const;
+
protected:
// A URLRequestContext for media that owns its HTTP factory, to ensure
// it is deleted.
@@ -367,84 +364,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;
- }
-
- data_reduction_proxy::DataReductionProxyConfigurator*
- data_reduction_proxy_configurator() const {
- return data_reduction_proxy_configurator_.get();
- }
-
- void set_data_reduction_proxy_configurator(
- scoped_ptr<data_reduction_proxy::DataReductionProxyConfigurator>
- data_reduction_proxy_configurator) const {
- data_reduction_proxy_configurator_ =
- data_reduction_proxy_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 {
@@ -645,23 +571,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<data_reduction_proxy::DataReductionProxyConfigurator>
- data_reduction_proxy_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_;
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698