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/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 base::Time::Now().LocalExplode(&exploded_time); | 76 base::Time::Now().LocalExplode(&exploded_time); |
77 html_source->AddString( | 77 html_source->AddString( |
78 "copyright", | 78 "copyright", |
79 l10n_util::GetStringFUTF16(IDS_ABOUT_VERSION_COPYRIGHT, | 79 l10n_util::GetStringFUTF16(IDS_ABOUT_VERSION_COPYRIGHT, |
80 base::IntToString16(exploded_time.year))); | 80 base::IntToString16(exploded_time.year))); |
81 html_source->AddLocalizedString("revision", IDS_ABOUT_VERSION_REVISION); | 81 html_source->AddLocalizedString("revision", IDS_ABOUT_VERSION_REVISION); |
82 html_source->AddString("cl", version_info.LastChange()); | 82 html_source->AddString("cl", version_info.LastChange()); |
83 html_source->AddLocalizedString("official", | 83 html_source->AddLocalizedString("official", |
84 version_info.IsOfficialBuild() ? IDS_ABOUT_VERSION_OFFICIAL : | 84 version_info.IsOfficialBuild() ? IDS_ABOUT_VERSION_OFFICIAL : |
85 IDS_ABOUT_VERSION_UNOFFICIAL); | 85 IDS_ABOUT_VERSION_UNOFFICIAL); |
| 86 #if defined(ARCH_CPU_64_BITS) |
| 87 html_source->AddLocalizedString("version_bitsize", IDS_ABOUT_VERSION_64BIT); |
| 88 #else |
| 89 html_source->AddLocalizedString("version_bitsize", IDS_ABOUT_VERSION_32BIT); |
| 90 #endif |
86 html_source->AddLocalizedString("user_agent_name", | 91 html_source->AddLocalizedString("user_agent_name", |
87 IDS_ABOUT_VERSION_USER_AGENT); | 92 IDS_ABOUT_VERSION_USER_AGENT); |
88 html_source->AddString("useragent", GetUserAgent()); | 93 html_source->AddString("useragent", GetUserAgent()); |
89 html_source->AddLocalizedString("command_line_name", | 94 html_source->AddLocalizedString("command_line_name", |
90 IDS_ABOUT_VERSION_COMMAND_LINE); | 95 IDS_ABOUT_VERSION_COMMAND_LINE); |
91 | 96 |
92 #if defined(OS_WIN) | 97 #if defined(OS_WIN) |
93 html_source->AddString( | 98 html_source->AddString( |
94 "command_line", | 99 "command_line", |
95 base::WideToUTF16( | 100 base::WideToUTF16( |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // Set up the chrome://theme/ source. | 147 // Set up the chrome://theme/ source. |
143 ThemeSource* theme = new ThemeSource(profile); | 148 ThemeSource* theme = new ThemeSource(profile); |
144 content::URLDataSource::Add(profile, theme); | 149 content::URLDataSource::Add(profile, theme); |
145 #endif | 150 #endif |
146 | 151 |
147 WebUIDataSource::Add(profile, CreateVersionUIDataSource()); | 152 WebUIDataSource::Add(profile, CreateVersionUIDataSource()); |
148 } | 153 } |
149 | 154 |
150 VersionUI::~VersionUI() { | 155 VersionUI::~VersionUI() { |
151 } | 156 } |
OLD | NEW |