OLD | NEW |
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/version_ui.h" | 5 #include "chrome/browser/ui/webui/version_ui.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 html_source->AddString("js_version", v8::V8::GetVersion()); | 55 html_source->AddString("js_version", v8::V8::GetVersion()); |
56 | 56 |
57 #if defined(OS_ANDROID) | 57 #if defined(OS_ANDROID) |
58 html_source->AddLocalizedString("application_label", | 58 html_source->AddLocalizedString("application_label", |
59 IDS_ABOUT_VERSION_APPLICATION); | 59 IDS_ABOUT_VERSION_APPLICATION); |
60 html_source->AddString("os_version", AndroidAboutAppInfo::GetOsInfo()); | 60 html_source->AddString("os_version", AndroidAboutAppInfo::GetOsInfo()); |
61 base::android::BuildInfo* android_build_info = | 61 base::android::BuildInfo* android_build_info = |
62 base::android::BuildInfo::GetInstance(); | 62 base::android::BuildInfo::GetInstance(); |
63 html_source->AddString("application_name", | 63 html_source->AddString("application_name", |
64 android_build_info->package_label()); | 64 android_build_info->package_label()); |
65 html_source->AddString("application_version", | 65 html_source->AddString("application_version_name", |
66 android_build_info->package_version_name()); | 66 android_build_info->package_version_name()); |
| 67 html_source->AddString("application_version_code", |
| 68 android_build_info->package_version_code()); |
67 html_source->AddLocalizedString("build_id_name", | 69 html_source->AddLocalizedString("build_id_name", |
68 IDS_ABOUT_VERSION_BUILD_ID); | 70 IDS_ABOUT_VERSION_BUILD_ID); |
69 html_source->AddString("build_id", CHROME_BUILD_ID); | 71 html_source->AddString("build_id", CHROME_BUILD_ID); |
70 #else | 72 #else |
71 html_source->AddLocalizedString("application_label", IDS_PRODUCT_NAME); | 73 html_source->AddLocalizedString("application_label", IDS_PRODUCT_NAME); |
72 html_source->AddString("os_version", std::string()); | 74 html_source->AddString("os_version", std::string()); |
73 html_source->AddString("flash_plugin", "Flash"); | 75 html_source->AddString("flash_plugin", "Flash"); |
74 // Note that the Flash version is retrieve asynchronously and returned in | 76 // Note that the Flash version is retrieve asynchronously and returned in |
75 // VersionHandler::OnGotPlugins. The area is initially blank. | 77 // VersionHandler::OnGotPlugins. The area is initially blank. |
76 html_source->AddString("flash_version", std::string()); | 78 html_source->AddString("flash_version", std::string()); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // Set up the chrome://theme/ source. | 142 // Set up the chrome://theme/ source. |
141 ThemeSource* theme = new ThemeSource(profile); | 143 ThemeSource* theme = new ThemeSource(profile); |
142 content::URLDataSource::Add(profile, theme); | 144 content::URLDataSource::Add(profile, theme); |
143 #endif | 145 #endif |
144 | 146 |
145 content::WebUIDataSource::Add(profile, CreateVersionUIDataSource(profile)); | 147 content::WebUIDataSource::Add(profile, CreateVersionUIDataSource(profile)); |
146 } | 148 } |
147 | 149 |
148 VersionUI::~VersionUI() { | 150 VersionUI::~VersionUI() { |
149 } | 151 } |
OLD | NEW |