Index: chrome/browser/profiles/profile_impl_io_data.cc |
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc |
index e12166230d1e5c6c4e600bbe65beb09b21156ada..eec3259a25b3e6bb630afaeb95f6bf1dfb8220c8 100644 |
--- a/chrome/browser/profiles/profile_impl_io_data.cc |
+++ b/chrome/browser/profiles/profile_impl_io_data.cc |
@@ -115,6 +115,7 @@ ProfileImplIOData::Handle::~Handle() { |
io_data_->http_server_properties_manager_->ShutdownOnPrefThread(); |
io_data_->ShutdownOnUIThread(GetAllContextGetters().Pass()); |
+ io_data_->data_reduction_proxy_enabled()->Destroy(); |
mmenke
2014/10/09 14:49:35
Think it's more consistent to do this before Shutd
Not at Google. Contact bengr
2014/10/09 22:24:41
Done.
|
} |
void ProfileImplIOData::Handle::Init( |
@@ -333,6 +334,7 @@ void ProfileImplIOData::Handle::ClearNetworkingHistorySince( |
} |
void ProfileImplIOData::Handle::LazyInitialize() const { |
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
if (initialized_) |
return; |
@@ -438,6 +440,8 @@ void ProfileImplIOData::InitializeInternal( |
data_reduction_proxy_usage_stats()->set_unavailable_callback( |
data_reduction_proxy_unavailable_callback()); |
+ network_delegate()->set_data_reduction_proxy_enabled_pref( |
+ &data_reduction_proxy_enabled_); |
network_delegate()->set_data_reduction_proxy_params( |
data_reduction_proxy_params()); |
network_delegate()->set_data_reduction_proxy_usage_stats( |
@@ -830,3 +834,9 @@ void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( |
DCHECK(http_server_properties_manager_); |
http_server_properties_manager_->Clear(completion); |
} |
+ |
+bool ProfileImplIOData::IsDataReductionProxyEnabled() const { |
+ return data_reduction_proxy_enabled_.GetValue() || |
+ CommandLine::ForCurrentProcess()->HasSwitch( |
+ data_reduction_proxy::switches::kEnableDataReductionProxy); |
+} |