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

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

Issue 10821026: Make about:version android friendly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolve presubmit warning. Created 8 years, 4 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
« no previous file with comments | « chrome/browser/resources/shared/css/about_version.css ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/about_ui.h" 5 #include "chrome/browser/ui/webui/about_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 localized_strings->SetString("os_name", 1018 localized_strings->SetString("os_name",
1019 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_OS)); 1019 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_OS));
1020 localized_strings->SetString("platform", 1020 localized_strings->SetString("platform",
1021 l10n_util::GetStringUTF16(IDS_PLATFORM_LABEL)); 1021 l10n_util::GetStringUTF16(IDS_PLATFORM_LABEL));
1022 localized_strings->SetString("os_type", version_info.OSType()); 1022 localized_strings->SetString("os_type", version_info.OSType());
1023 localized_strings->SetString("webkit_version", 1023 localized_strings->SetString("webkit_version",
1024 webkit_glue::GetWebKitVersion()); 1024 webkit_glue::GetWebKitVersion());
1025 localized_strings->SetString("js_engine", "V8"); 1025 localized_strings->SetString("js_engine", "V8");
1026 localized_strings->SetString("js_version", v8::V8::GetVersion()); 1026 localized_strings->SetString("js_version", v8::V8::GetVersion());
1027 1027
1028 #if !defined(OS_ANDROID)
1028 // Obtain the version of the first enabled Flash plugin. 1029 // Obtain the version of the first enabled Flash plugin.
1029 std::vector<webkit::WebPluginInfo> info_array; 1030 std::vector<webkit::WebPluginInfo> info_array;
1030 PluginService::GetInstance()->GetPluginInfoArray( 1031 PluginService::GetInstance()->GetPluginInfoArray(
1031 GURL(), "application/x-shockwave-flash", false, &info_array, NULL); 1032 GURL(), "application/x-shockwave-flash", false, &info_array, NULL);
1032 string16 flash_version = 1033 string16 flash_version =
1033 l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_PLUGIN); 1034 l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_PLUGIN);
1034 PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile); 1035 PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile);
1035 if (plugin_prefs) { 1036 if (plugin_prefs) {
1036 for (size_t i = 0; i < info_array.size(); ++i) { 1037 for (size_t i = 0; i < info_array.size(); ++i) {
1037 if (plugin_prefs->IsPluginEnabled(info_array[i])) { 1038 if (plugin_prefs->IsPluginEnabled(info_array[i])) {
1038 flash_version = info_array[i].version; 1039 flash_version = info_array[i].version;
1039 break; 1040 break;
1040 } 1041 }
1041 } 1042 }
1042 } 1043 }
1043 localized_strings->SetString("flash_plugin", "Flash"); 1044 localized_strings->SetString("flash_plugin", "Flash");
1044 localized_strings->SetString("flash_version", flash_version); 1045 localized_strings->SetString("flash_version", flash_version);
1046 #endif
1045 localized_strings->SetString("company", 1047 localized_strings->SetString("company",
1046 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COMPANY_NAME)); 1048 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COMPANY_NAME));
1047 localized_strings->SetString("copyright", 1049 localized_strings->SetString("copyright",
1048 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COPYRIGHT)); 1050 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COPYRIGHT));
1049 localized_strings->SetString("cl", version_info.LastChange()); 1051 localized_strings->SetString("cl", version_info.LastChange());
1050 localized_strings->SetString("official", 1052 localized_strings->SetString("official",
1051 l10n_util::GetStringUTF16( 1053 l10n_util::GetStringUTF16(
1052 version_info.IsOfficialBuild() ? 1054 version_info.IsOfficialBuild() ?
1053 IDS_ABOUT_VERSION_OFFICIAL 1055 IDS_ABOUT_VERSION_OFFICIAL
1054 : IDS_ABOUT_VERSION_UNOFFICIAL)); 1056 : IDS_ABOUT_VERSION_UNOFFICIAL));
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 1376
1375 AboutUI::AboutUI(content::WebUI* web_ui, const std::string& name) 1377 AboutUI::AboutUI(content::WebUI* web_ui, const std::string& name)
1376 : WebUIController(web_ui) { 1378 : WebUIController(web_ui) {
1377 Profile* profile = Profile::FromWebUI(web_ui); 1379 Profile* profile = Profile::FromWebUI(web_ui);
1378 ChromeURLDataManager::DataSource* source = 1380 ChromeURLDataManager::DataSource* source =
1379 new AboutUIHTMLSource(name, profile); 1381 new AboutUIHTMLSource(name, profile);
1380 if (source) { 1382 if (source) {
1381 ChromeURLDataManager::AddDataSource(profile, source); 1383 ChromeURLDataManager::AddDataSource(profile, source);
1382 } 1384 }
1383 } 1385 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/shared/css/about_version.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698