| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 html_source->AddString("flash_version", std::string()); | 79 html_source->AddString("flash_version", std::string()); |
| 80 #endif // defined(OS_ANDROID) | 80 #endif // defined(OS_ANDROID) |
| 81 | 81 |
| 82 html_source->AddLocalizedString("company", IDS_ABOUT_VERSION_COMPANY_NAME); | 82 html_source->AddLocalizedString("company", IDS_ABOUT_VERSION_COMPANY_NAME); |
| 83 base::Time::Exploded exploded_time; | 83 base::Time::Exploded exploded_time; |
| 84 base::Time::Now().LocalExplode(&exploded_time); | 84 base::Time::Now().LocalExplode(&exploded_time); |
| 85 html_source->AddString( | 85 html_source->AddString( |
| 86 "copyright", | 86 "copyright", |
| 87 l10n_util::GetStringFUTF16(IDS_ABOUT_VERSION_COPYRIGHT, | 87 l10n_util::GetStringFUTF16(IDS_ABOUT_VERSION_COPYRIGHT, |
| 88 base::IntToString16(exploded_time.year))); | 88 base::IntToString16(exploded_time.year))); |
| 89 html_source->AddLocalizedString("revision", IDS_ABOUT_VERSION_REVISION); |
| 89 html_source->AddString("cl", version_info.LastChange()); | 90 html_source->AddString("cl", version_info.LastChange()); |
| 90 html_source->AddLocalizedString("official", | 91 html_source->AddLocalizedString("official", |
| 91 version_info.IsOfficialBuild() ? IDS_ABOUT_VERSION_OFFICIAL : | 92 version_info.IsOfficialBuild() ? IDS_ABOUT_VERSION_OFFICIAL : |
| 92 IDS_ABOUT_VERSION_UNOFFICIAL); | 93 IDS_ABOUT_VERSION_UNOFFICIAL); |
| 93 html_source->AddLocalizedString("user_agent_name", | 94 html_source->AddLocalizedString("user_agent_name", |
| 94 IDS_ABOUT_VERSION_USER_AGENT); | 95 IDS_ABOUT_VERSION_USER_AGENT); |
| 95 html_source->AddString("useragent", GetUserAgent()); | 96 html_source->AddString("useragent", GetUserAgent()); |
| 96 html_source->AddLocalizedString("command_line_name", | 97 html_source->AddLocalizedString("command_line_name", |
| 97 IDS_ABOUT_VERSION_COMMAND_LINE); | 98 IDS_ABOUT_VERSION_COMMAND_LINE); |
| 98 | 99 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // Set up the chrome://theme/ source. | 149 // Set up the chrome://theme/ source. |
| 149 ThemeSource* theme = new ThemeSource(profile); | 150 ThemeSource* theme = new ThemeSource(profile); |
| 150 content::URLDataSource::Add(profile, theme); | 151 content::URLDataSource::Add(profile, theme); |
| 151 #endif | 152 #endif |
| 152 | 153 |
| 153 content::WebUIDataSource::Add(profile, CreateVersionUIDataSource(profile)); | 154 content::WebUIDataSource::Add(profile, CreateVersionUIDataSource(profile)); |
| 154 } | 155 } |
| 155 | 156 |
| 156 VersionUI::~VersionUI() { | 157 VersionUI::~VersionUI() { |
| 157 } | 158 } |
| OLD | NEW |