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

Unified Diff: chrome/browser/ui/webui/net_internals/net_internals_ui.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: Created 6 years, 1 month 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 89d4ce3d01998be876aa5c870ffb6aa77538461d..ba89320a0e1a5e1e48f49100444331ffcba963a2 100644
--- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -43,6 +43,7 @@
#include "chrome/common/chrome_paths.h"
#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/onc/onc_constants.h"
#include "components/url_fixer/url_fixer.h"
#include "content/public/browser/browser_thread.h"
@@ -665,8 +666,8 @@ void NetInternalsMessageHandler::OnGetHistoricNetworkStats(
DCHECK_CURRENTLY_ON(BrowserThread::UI);
Profile* profile = Profile::FromWebUI(web_ui());
base::Value* historic_network_info =
- ChromeNetworkDelegate::HistoricNetworkStatsInfoToValue(
- profile->GetPrefs());
+ data_reduction_proxy::DataReductionProxyNetworkDelegate::
+ HistoricNetworkStatsInfoToValue(profile->GetPrefs());
SendJavascriptCommand("receivedHistoricNetworkStats", historic_network_info);
}
@@ -1078,8 +1079,8 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetSessionNetworkStats(
base::Value* network_info = NULL;
if (http_network_session) {
- ChromeNetworkDelegate* net_delegate =
- static_cast<ChromeNetworkDelegate*>(
+ data_reduction_proxy::DataReductionProxyNetworkDelegate* net_delegate =
+ static_cast<data_reduction_proxy::DataReductionProxyNetworkDelegate*>(
http_network_session->network_delegate());
if (net_delegate) {
network_info = net_delegate->SessionNetworkStatsInfoToValue();

Powered by Google App Engine
This is Rietveld 408576698