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

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

Issue 1811283004: Remove NetworkDelegate from HttpNetworkSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to comments Created 4 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
« no previous file with comments | « no previous file | content/shell/browser/shell_url_request_context_getter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3b0d9ec85a1be9e2917c06e4fd4a1eac99adf327..1f3cd2202f3c48164adb614aba8cf3ce7774560c 100644
--- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -867,14 +867,18 @@ void NetInternalsMessageHandler::IOThreadImpl::OnHSTSDelete(
void NetInternalsMessageHandler::IOThreadImpl::OnGetSessionNetworkStats(
const base::ListValue* list) {
DCHECK(!list);
+ net::URLRequestContext* context =
+ main_context_getter_->GetURLRequestContext();
net::HttpNetworkSession* http_network_session =
- GetHttpNetworkSession(main_context_getter_->GetURLRequestContext());
+ GetHttpNetworkSession(context);
base::Value* network_info = NULL;
if (http_network_session) {
+ // TODO(mmenke): This cast is ugly. Can we get rid of it, or, better,
+ // remove DRP data from net-internals entirely?
data_reduction_proxy::DataReductionProxyNetworkDelegate* net_delegate =
static_cast<data_reduction_proxy::DataReductionProxyNetworkDelegate*>(
- http_network_session->network_delegate());
+ context->network_delegate());
if (net_delegate) {
network_info = net_delegate->SessionNetworkStatsInfoToValue();
}
« no previous file with comments | « no previous file | content/shell/browser/shell_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698