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

Unified Diff: chrome/browser/ui/webui/version_ui.cc

Issue 2626043007: Clean up chrome://version page. (Closed)
Patch Set: fix rebase Created 3 years, 11 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 | « chrome/app/generated_resources.grd ('k') | components/version_ui/resources/about_version.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/version_ui.cc
diff --git a/chrome/browser/ui/webui/version_ui.cc b/chrome/browser/ui/webui/version_ui.cc
index 8235a8a6bafb52b1c01a254dfe4f4b760802a133..78fd30791168efe10247a3a74b8b831585c83cac 100644
--- a/chrome/browser/ui/webui/version_ui.cc
+++ b/chrome/browser/ui/webui/version_ui.cc
@@ -30,7 +30,6 @@
#include "v8/include/v8-version-string.h"
#if defined(OS_ANDROID)
-#include "base/android/build_info.h"
#include "chrome/browser/ui/android/android_about_app_info.h"
#else // !defined(OS_ANDROID)
#include "chrome/browser/ui/webui/theme_source.h"
@@ -56,24 +55,8 @@ WebUIDataSource* CreateVersionUIDataSource() {
version_info::GetVersionNumber());
html_source->AddString(version_ui::kVersionModifier,
chrome::GetChannelString());
- html_source->AddLocalizedString(version_ui::kOSName, IDS_VERSION_UI_OS);
- html_source->AddLocalizedString(version_ui::kARC, IDS_ARC_LABEL);
- html_source->AddLocalizedString(version_ui::kPlatform, IDS_PLATFORM_LABEL);
- html_source->AddString(version_ui::kOSType, version_info::GetOSType());
html_source->AddString(version_ui::kJSEngine, "V8");
html_source->AddString(version_ui::kJSVersion, V8_VERSION_STRING);
-
-#if defined(OS_ANDROID)
- html_source->AddString(version_ui::kOSVersion,
- AndroidAboutAppInfo::GetOsInfo());
-#else
- html_source->AddString(version_ui::kOSVersion, std::string());
- html_source->AddString(version_ui::kFlashPlugin, "Flash");
- // Note that the Flash version is retrieve asynchronously and returned in
- // VersionHandler::OnGotPlugins. The area is initially blank.
- html_source->AddString(version_ui::kFlashVersion, std::string());
-#endif // defined(OS_ANDROID)
-
html_source->AddLocalizedString(version_ui::kCompany,
IDS_ABOUT_VERSION_COMPANY_NAME);
html_source->AddString(
@@ -88,12 +71,43 @@ WebUIDataSource* CreateVersionUIDataSource() {
version_info::IsOfficialBuild()
? IDS_VERSION_UI_OFFICIAL
: IDS_VERSION_UI_UNOFFICIAL);
+ html_source->AddLocalizedString(version_ui::kUserAgentName,
+ IDS_VERSION_UI_USER_AGENT);
+ html_source->AddString(version_ui::kUserAgent, GetUserAgent());
+ html_source->AddLocalizedString(version_ui::kCommandLineName,
+ IDS_VERSION_UI_COMMAND_LINE);
+ // Note that the executable path and profile path are retrieved asynchronously
+ // and returned in VersionHandler::OnGotFilePaths. The area is initially
+ // blank.
+ html_source->AddLocalizedString(version_ui::kExecutablePathName,
+ IDS_VERSION_UI_EXECUTABLE_PATH);
+ html_source->AddString(version_ui::kExecutablePath, std::string());
+ html_source->AddLocalizedString(version_ui::kProfilePathName,
+ IDS_VERSION_UI_PROFILE_PATH);
+ html_source->AddString(version_ui::kProfilePath, std::string());
+ html_source->AddLocalizedString(version_ui::kVariationsName,
+ IDS_VERSION_UI_VARIATIONS);
#if defined(OS_CHROMEOS)
+ html_source->AddLocalizedString(version_ui::kARC, IDS_ARC_LABEL);
+ html_source->AddLocalizedString(version_ui::kPlatform, IDS_PLATFORM_LABEL);
html_source->AddLocalizedString(version_ui::kCustomizationId,
IDS_VERSION_UI_CUSTOMIZATION_ID);
+#else
+ html_source->AddLocalizedString(version_ui::kOSName, IDS_VERSION_UI_OS);
+ html_source->AddString(version_ui::kOSType, version_info::GetOSType());
#endif // OS_CHROMEOS
+#if defined(OS_ANDROID)
+ html_source->AddString(version_ui::kOSVersion,
+ AndroidAboutAppInfo::GetOsInfo());
+#else
+ html_source->AddString(version_ui::kFlashPlugin, "Flash");
+ // Note that the Flash version is retrieve asynchronously and returned in
+ // VersionHandler::OnGotPlugins. The area is initially blank.
+ html_source->AddString(version_ui::kFlashVersion, std::string());
+#endif // OS_ANDROID
+
#if defined(ARCH_CPU_64_BITS)
html_source->AddLocalizedString(version_ui::kVersionBitSize,
IDS_VERSION_UI_64BIT);
@@ -101,11 +115,6 @@ WebUIDataSource* CreateVersionUIDataSource() {
html_source->AddLocalizedString(version_ui::kVersionBitSize,
IDS_VERSION_UI_32BIT);
#endif
- html_source->AddLocalizedString(version_ui::kUserAgentName,
- IDS_VERSION_UI_USER_AGENT);
- html_source->AddString(version_ui::kUserAgent, GetUserAgent());
- html_source->AddLocalizedString(version_ui::kCommandLineName,
- IDS_VERSION_UI_COMMAND_LINE);
#if defined(OS_WIN)
html_source->AddString(
@@ -122,39 +131,25 @@ WebUIDataSource* CreateVersionUIDataSource() {
html_source->AddString(version_ui::kCommandLine, command_line);
#endif
- // Note that the executable path and profile path are retrieved asynchronously
- // and returned in VersionHandler::OnGotFilePaths. The area is initially
- // blank.
- html_source->AddLocalizedString(version_ui::kExecutablePathName,
- IDS_VERSION_UI_EXECUTABLE_PATH);
- html_source->AddString(version_ui::kExecutablePath, std::string());
-
- html_source->AddLocalizedString(version_ui::kProfilePathName,
- IDS_VERSION_UI_PROFILE_PATH);
- html_source->AddString(version_ui::kProfilePath, std::string());
-
- html_source->AddLocalizedString(version_ui::kVariationsName,
- IDS_VERSION_UI_VARIATIONS);
-
#if defined(OS_WIN)
#if defined(__clang__)
- html_source->AddString("compiler", "clang");
+ html_source->AddString(version_ui::kCompiler, "clang");
#elif defined(_MSC_VER) && _MSC_VER == 1900
#if BUILDFLAG(PGO_BUILD)
- html_source->AddString("compiler", "MSVC 2015 (PGO)");
+ html_source->AddString(version_ui::kCompiler, "MSVC 2015 (PGO)");
#else
- html_source->AddString("compiler", "MSVC 2015");
+ html_source->AddString(version_ui::kCompiler, "MSVC 2015");
#endif
#elif defined(_MSC_VER) && _MSC_VER == 1910
#if BUILDFLAG(PGO_BUILD)
- html_source->AddString("compiler", "MSVC 2017 (PGO)");
+ html_source->AddString(version_ui::kCompiler, "MSVC 2017 (PGO)");
#else
- html_source->AddString("compiler", "MSVC 2017");
+ html_source->AddString(version_ui::kCompiler, "MSVC 2017");
#endif
#elif defined(_MSC_VER)
#error "Unsupported version of MSVC."
#else
- html_source->AddString("compiler", "Unknown");
+ html_source->AddString(version_ui::kCompiler, "Unknown");
#endif
#endif // defined(OS_WIN)
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | components/version_ui/resources/about_version.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698