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

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

Issue 7249003: Move GetVersionStringModifier() and GetChannel() from platform_util_* to chrome_version_info_* (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: correct nits Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_ui.h" 5 #include "chrome/browser/ui/webui/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 10 matching lines...) Expand all
21 #include "base/string_split.h" 21 #include "base/string_split.h"
22 #include "base/string_util.h" 22 #include "base/string_util.h"
23 #include "base/utf_string_conversions.h" 23 #include "base/utf_string_conversions.h"
24 #include "base/values.h" 24 #include "base/values.h"
25 #include "chrome/browser/browser_process.h" 25 #include "chrome/browser/browser_process.h"
26 #include "chrome/browser/io_thread.h" 26 #include "chrome/browser/io_thread.h"
27 #include "chrome/browser/net/chrome_net_log.h" 27 #include "chrome/browser/net/chrome_net_log.h"
28 #include "chrome/browser/net/connection_tester.h" 28 #include "chrome/browser/net/connection_tester.h"
29 #include "chrome/browser/net/passive_log_collector.h" 29 #include "chrome/browser/net/passive_log_collector.h"
30 #include "chrome/browser/net/url_fixer_upper.h" 30 #include "chrome/browser/net/url_fixer_upper.h"
31 #include "chrome/browser/platform_util.h"
32 #include "chrome/browser/prefs/pref_member.h" 31 #include "chrome/browser/prefs/pref_member.h"
33 #include "chrome/browser/prerender/prerender_manager.h" 32 #include "chrome/browser/prerender/prerender_manager.h"
34 #include "chrome/browser/profiles/profile.h" 33 #include "chrome/browser/profiles/profile.h"
35 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 34 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
36 #include "chrome/common/chrome_paths.h" 35 #include "chrome/common/chrome_paths.h"
37 #include "chrome/common/chrome_version_info.h" 36 #include "chrome/common/chrome_version_info.h"
38 #include "chrome/common/jstemplate_builder.h" 37 #include "chrome/common/jstemplate_builder.h"
39 #include "chrome/common/pref_names.h" 38 #include "chrome/common/pref_names.h"
40 #include "chrome/common/url_constants.h" 39 #include "chrome/common/url_constants.h"
41 #include "content/browser/browser_thread.h" 40 #include "content/browser/browser_thread.h"
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 888
890 chrome::VersionInfo version_info; 889 chrome::VersionInfo version_info;
891 890
892 if (!version_info.is_valid()) { 891 if (!version_info.is_valid()) {
893 DLOG(ERROR) << "Unable to create chrome::VersionInfo"; 892 DLOG(ERROR) << "Unable to create chrome::VersionInfo";
894 } else { 893 } else {
895 // We have everything we need to send the right values. 894 // We have everything we need to send the right values.
896 dict->SetString("version", version_info.Version()); 895 dict->SetString("version", version_info.Version());
897 dict->SetString("cl", version_info.LastChange()); 896 dict->SetString("cl", version_info.LastChange());
898 dict->SetString("version_mod", 897 dict->SetString("version_mod",
899 platform_util::GetVersionStringModifier()); 898 chrome::VersionInfo::GetVersionStringModifier());
900 dict->SetString("official", 899 dict->SetString("official",
901 l10n_util::GetStringUTF16( 900 l10n_util::GetStringUTF16(
902 version_info.IsOfficialBuild() ? 901 version_info.IsOfficialBuild() ?
903 IDS_ABOUT_VERSION_OFFICIAL 902 IDS_ABOUT_VERSION_OFFICIAL
904 : IDS_ABOUT_VERSION_UNOFFICIAL)); 903 : IDS_ABOUT_VERSION_UNOFFICIAL));
905 904
906 dict->SetString("command_line", 905 dict->SetString("command_line",
907 CommandLine::ForCurrentProcess()->command_line_string()); 906 CommandLine::ForCurrentProcess()->command_line_string());
908 } 907 }
909 908
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 //////////////////////////////////////////////////////////////////////////////// 1597 ////////////////////////////////////////////////////////////////////////////////
1599 1598
1600 NetInternalsUI::NetInternalsUI(TabContents* contents) : ChromeWebUI(contents) { 1599 NetInternalsUI::NetInternalsUI(TabContents* contents) : ChromeWebUI(contents) {
1601 AddMessageHandler((new NetInternalsMessageHandler())->Attach(this)); 1600 AddMessageHandler((new NetInternalsMessageHandler())->Attach(this));
1602 1601
1603 NetInternalsHTMLSource* html_source = new NetInternalsHTMLSource(); 1602 NetInternalsHTMLSource* html_source = new NetInternalsHTMLSource();
1604 1603
1605 // Set up the chrome://net-internals/ source. 1604 // Set up the chrome://net-internals/ source.
1606 GetProfile()->GetChromeURLDataManager()->AddDataSource(html_source); 1605 GetProfile()->GetChromeURLDataManager()->AddDataSource(html_source);
1607 } 1606 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/gpu_internals_ui.cc ('k') | chrome/browser/ui/webui/options/about_page_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698