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

Side by Side Diff: chrome/browser/ui/webui/net_internals/net_internals_ui.cc

Issue 949533004: Rename DataReductionProxyStatisticsPrefs to DataReductionProxyCompressionStats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" 5 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 27 matching lines...) Expand all
38 #include "chrome/browser/net/chrome_network_delegate.h" 38 #include "chrome/browser/net/chrome_network_delegate.h"
39 #include "chrome/browser/net/connection_tester.h" 39 #include "chrome/browser/net/connection_tester.h"
40 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 40 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
41 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" 41 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h"
42 #include "chrome/browser/prerender/prerender_manager.h" 42 #include "chrome/browser/prerender/prerender_manager.h"
43 #include "chrome/browser/prerender/prerender_manager_factory.h" 43 #include "chrome/browser/prerender/prerender_manager_factory.h"
44 #include "chrome/browser/profiles/profile.h" 44 #include "chrome/browser/profiles/profile.h"
45 #include "chrome/common/chrome_paths.h" 45 #include "chrome/common/chrome_paths.h"
46 #include "chrome/common/chrome_version_info.h" 46 #include "chrome/common/chrome_version_info.h"
47 #include "chrome/common/url_constants.h" 47 #include "chrome/common/url_constants.h"
48 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_comp ression_stats.h"
48 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_netw ork_delegate.h" 49 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_netw ork_delegate.h"
49 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv ice.h" 50 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv ice.h"
50 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_stat istics_prefs.h"
51 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event _store.h" 51 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event _store.h"
52 #include "components/onc/onc_constants.h" 52 #include "components/onc/onc_constants.h"
53 #include "components/url_fixer/url_fixer.h" 53 #include "components/url_fixer/url_fixer.h"
54 #include "content/public/browser/browser_thread.h" 54 #include "content/public/browser/browser_thread.h"
55 #include "content/public/browser/notification_details.h" 55 #include "content/public/browser/notification_details.h"
56 #include "content/public/browser/resource_dispatcher_host.h" 56 #include "content/public/browser/resource_dispatcher_host.h"
57 #include "content/public/browser/web_contents.h" 57 #include "content/public/browser/web_contents.h"
58 #include "content/public/browser/web_ui.h" 58 #include "content/public/browser/web_ui.h"
59 #include "content/public/browser/web_ui_data_source.h" 59 #include "content/public/browser/web_ui_data_source.h"
60 #include "content/public/browser/web_ui_message_handler.h" 60 #include "content/public/browser/web_ui_message_handler.h"
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 } 615 }
616 616
617 void NetInternalsMessageHandler::OnGetHistoricNetworkStats( 617 void NetInternalsMessageHandler::OnGetHistoricNetworkStats(
618 const base::ListValue* list) { 618 const base::ListValue* list) {
619 DCHECK_CURRENTLY_ON(BrowserThread::UI); 619 DCHECK_CURRENTLY_ON(BrowserThread::UI);
620 base::Value* historic_network_info = NULL; 620 base::Value* historic_network_info = NULL;
621 Profile* profile = Profile::FromWebUI(web_ui()); 621 Profile* profile = Profile::FromWebUI(web_ui());
622 DataReductionProxyChromeSettings* data_reduction_proxy_settings = 622 DataReductionProxyChromeSettings* data_reduction_proxy_settings =
623 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile); 623 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile);
624 if (data_reduction_proxy_settings) { 624 if (data_reduction_proxy_settings) {
625 data_reduction_proxy::DataReductionProxyStatisticsPrefs* statistics_prefs = 625 data_reduction_proxy::DataReductionProxyCompressionStats*
626 data_reduction_proxy_settings->data_reduction_proxy_service()-> 626 compression_stats =
627 statistics_prefs(); 627 data_reduction_proxy_settings->data_reduction_proxy_service()
628 historic_network_info = statistics_prefs->HistoricNetworkStatsInfoToValue(); 628 ->compression_stats();
629 historic_network_info =
630 compression_stats->HistoricNetworkStatsInfoToValue();
629 } 631 }
630 SendJavascriptCommand("receivedHistoricNetworkStats", historic_network_info); 632 SendJavascriptCommand("receivedHistoricNetworkStats", historic_network_info);
631 } 633 }
632 634
633 void NetInternalsMessageHandler::OnGetExtensionInfo( 635 void NetInternalsMessageHandler::OnGetExtensionInfo(
634 const base::ListValue* list) { 636 const base::ListValue* list) {
635 DCHECK_CURRENTLY_ON(BrowserThread::UI); 637 DCHECK_CURRENTLY_ON(BrowserThread::UI);
636 base::ListValue* extension_list = new base::ListValue(); 638 base::ListValue* extension_list = new base::ListValue();
637 #if defined(ENABLE_EXTENSIONS) 639 #if defined(ENABLE_EXTENSIONS)
638 Profile* profile = Profile::FromWebUI(web_ui()); 640 Profile* profile = Profile::FromWebUI(web_ui());
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 } 1322 }
1321 1323
1322 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) 1324 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui)
1323 : WebUIController(web_ui) { 1325 : WebUIController(web_ui) {
1324 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); 1326 web_ui->AddMessageHandler(new NetInternalsMessageHandler());
1325 1327
1326 // Set up the chrome://net-internals/ source. 1328 // Set up the chrome://net-internals/ source.
1327 Profile* profile = Profile::FromWebUI(web_ui); 1329 Profile* profile = Profile::FromWebUI(web_ui);
1328 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); 1330 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource());
1329 } 1331 }
OLDNEW
« no previous file with comments | « chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc ('k') | components/components_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698