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

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

Issue 382313003: Add data reduction functionality to all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head Created 6 years, 3 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
Index: chrome/browser/profiles/profile_io_data.cc
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index 46891feb1e1f483ce24ab6f813b2a519607c80b2..76f16aae4c3841e0cc4754192c678b349d83d701 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -42,6 +42,7 @@
#include "chrome/browser/net/chrome_url_request_context_getter.h"
#include "chrome/browser/net/cookie_store_util.h"
#include "chrome/browser/net/proxy_service_factory.h"
+#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/signin/signin_names_io_thread.h"
@@ -49,6 +50,10 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
+#include "components/data_reduction_proxy/browser/data_reduction_proxy_config_service.h"
+#include "components/data_reduction_proxy/browser/data_reduction_proxy_configurator.h"
+#include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.h"
+#include "components/data_reduction_proxy/common/data_reduction_proxy_switches.h"
#include "components/dom_distiller/core/url_constants.h"
#include "components/startup_metric_utils/startup_metric_utils.h"
#include "components/sync_driver/pref_names.h"
@@ -848,17 +853,11 @@ bool ProfileIOData::GetMetricsEnabledStateOnIOThread() const {
#endif // defined(OS_CHROMEOS)
}
-#if defined(OS_ANDROID)
bool ProfileIOData::IsDataReductionProxyEnabled() const {
-#if defined(SPDY_PROXY_AUTH_ORIGIN)
return data_reduction_proxy_enabled_.GetValue() ||
CommandLine::ForCurrentProcess()->HasSwitch(
data_reduction_proxy::switches::kEnableDataReductionProxy);
-#else
- return false;
-#endif // defined(SPDY_PROXY_AUTH_ORIGIN)
}
-#endif
base::WeakPtr<net::HttpServerProperties>
ProfileIOData::http_server_properties() const {
@@ -1014,10 +1013,8 @@ void ProfileIOData::Init(
network_delegate->set_cookie_settings(profile_params_->cookie_settings.get());
network_delegate->set_enable_do_not_track(&enable_do_not_track_);
network_delegate->set_force_google_safe_search(&force_safesearch_);
-#if defined(SPDY_PROXY_AUTH_ORIGIN)
network_delegate->set_data_reduction_proxy_enabled_pref(
&data_reduction_proxy_enabled_);
-#endif
network_delegate->set_prerender_tracker(profile_params_->prerender_tracker);
network_delegate_.reset(network_delegate);
@@ -1035,7 +1032,6 @@ void ProfileIOData::Init(
profile_params_->proxy_config_service.release(),
command_line,
quick_check_enabled_.GetValue()));
-
transport_security_state_.reset(new net::TransportSecurityState());
transport_security_persister_.reset(
new net::TransportSecurityPersister(
@@ -1191,9 +1187,7 @@ void ProfileIOData::ShutdownOnUIThread(
enable_metrics_.Destroy();
#endif
safe_browsing_enabled_.Destroy();
-#if defined(SPDY_PROXY_AUTH_ORIGIN)
data_reduction_proxy_enabled_.Destroy();
-#endif
printing_enabled_.Destroy();
sync_disabled_.Destroy();
signin_allowed_.Destroy();

Powered by Google App Engine
This is Rietveld 408576698