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

Unified Diff: chrome/browser/ui/webui/net_internals/net_internals_ui.cc

Issue 989663002: HistoricNetworkStatsInfoToValue should use statistics prefs values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/ui/webui/net_internals/net_internals_ui.cc
diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
index 4877cdec3acc0a7a03339b018f13051709c6a077..51c0fce3d968a09c09b292a4aa1c2f54f57033fe 100644
--- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -45,6 +45,8 @@
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/url_constants.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h"
+#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h"
+#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h"
#include "components/onc/onc_constants.h"
#include "components/url_fixer/url_fixer.h"
@@ -584,9 +586,13 @@ void NetInternalsMessageHandler::OnGetHistoricNetworkStats(
const base::ListValue* list) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
Profile* profile = Profile::FromWebUI(web_ui());
+ DataReductionProxyChromeSettings* data_reduction_proxy_settings =
+ DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile);
+ data_reduction_proxy::DataReductionProxyStatisticsPrefs* statistics_prefs =
+ data_reduction_proxy_settings->data_reduction_proxy_service()->
+ statistics_prefs();
base::Value* historic_network_info =
- data_reduction_proxy::DataReductionProxyNetworkDelegate::
- HistoricNetworkStatsInfoToValue(profile->GetPrefs());
+ statistics_prefs->HistoricNetworkStatsInfoToValue();
SendJavascriptCommand("receivedHistoricNetworkStats", historic_network_info);
}

Powered by Google App Engine
This is Rietveld 408576698