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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc

Issue 734263003: Move data reduction proxy logic out of chrome and android webview network delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test fix Created 6 years 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: components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc
index af0932b0c25b00dcccf86e472c074386b5a0bbe8..b26d8c732f095879280a65feb7051417a310baba 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc
@@ -468,9 +468,10 @@ void UpdateContentLengthPrefsForDataReductionProxy(
void UpdateContentLengthPrefs(int received_content_length,
int original_content_length,
- PrefService* profile_prefs,
+ bool data_reduction_proxy_enabled,
DataReductionProxyRequestType request_type,
DataReductionProxyStatisticsPrefs* prefs) {
+ DCHECK(prefs);
int64 total_received = prefs->GetInt64(
data_reduction_proxy::prefs::kHttpReceivedContentLength);
int64 total_original = prefs->GetInt64(
@@ -484,13 +485,10 @@ void UpdateContentLengthPrefs(int received_content_length,
data_reduction_proxy::prefs::kHttpOriginalContentLength,
total_original);
- bool with_data_reduction_proxy_enabled =
- profile_prefs->GetBoolean(
- data_reduction_proxy::prefs::kDataReductionProxyEnabled);
UpdateContentLengthPrefsForDataReductionProxy(
received_content_length,
original_content_length,
- with_data_reduction_proxy_enabled,
+ data_reduction_proxy_enabled,
request_type,
base::Time::Now(),
prefs);

Powered by Google App Engine
This is Rietveld 408576698