Chromium Code Reviews| 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/help/help_handler.h" | 5 #include "chrome/browser/ui/webui/help/help_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "ash/system/chromeos/devicetype_utils.h" | 11 #include "ash/system/chromeos/devicetype_utils.h" |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/bind_helpers.h" | 13 #include "base/bind_helpers.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 16 #include "base/files/file_util.h" | 16 #include "base/files/file_util.h" |
| 17 #include "base/i18n/message_formatter.h" | |
|
michaelpg
2016/05/27 16:45:19
here and the other impl files: nit: import time.h
Greg Levin
2016/05/27 17:41:27
Done.
| |
| 17 #include "base/location.h" | 18 #include "base/location.h" |
| 18 #include "base/macros.h" | 19 #include "base/macros.h" |
| 19 #include "base/strings/string16.h" | 20 #include "base/strings/string16.h" |
| 20 #include "base/strings/string_number_conversions.h" | |
| 21 #include "base/strings/string_util.h" | 21 #include "base/strings/string_util.h" |
| 22 #include "base/strings/utf_string_conversions.h" | 22 #include "base/strings/utf_string_conversions.h" |
| 23 #include "base/task_runner_util.h" | 23 #include "base/task_runner_util.h" |
| 24 #include "base/values.h" | 24 #include "base/values.h" |
| 25 #include "build/build_config.h" | 25 #include "build/build_config.h" |
| 26 #include "chrome/browser/browser_process.h" | 26 #include "chrome/browser/browser_process.h" |
| 27 #include "chrome/browser/chrome_notification_types.h" | 27 #include "chrome/browser/chrome_notification_types.h" |
| 28 #include "chrome/browser/obsolete_system/obsolete_system.h" | 28 #include "chrome/browser/obsolete_system/obsolete_system.h" |
| 29 #include "chrome/browser/ui/browser.h" | 29 #include "chrome/browser/ui/browser.h" |
| 30 #include "chrome/browser/ui/browser_commands.h" | 30 #include "chrome/browser/ui/browser_commands.h" |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 313 localized_strings->SetString("updateObsoleteSystem", | 313 localized_strings->SetString("updateObsoleteSystem", |
| 314 ObsoleteSystem::LocalizedObsoleteString()); | 314 ObsoleteSystem::LocalizedObsoleteString()); |
| 315 localized_strings->SetString("updateObsoleteSystemURL", | 315 localized_strings->SetString("updateObsoleteSystemURL", |
| 316 ObsoleteSystem::GetLinkURL()); | 316 ObsoleteSystem::GetLinkURL()); |
| 317 | 317 |
| 318 localized_strings->SetString( | 318 localized_strings->SetString( |
| 319 "browserVersion", | 319 "browserVersion", |
| 320 l10n_util::GetStringFUTF16(IDS_ABOUT_PRODUCT_VERSION, | 320 l10n_util::GetStringFUTF16(IDS_ABOUT_PRODUCT_VERSION, |
| 321 BuildBrowserVersionString())); | 321 BuildBrowserVersionString())); |
| 322 | 322 |
| 323 base::Time::Exploded exploded_time; | |
| 324 base::Time::Now().LocalExplode(&exploded_time); | |
| 325 localized_strings->SetString( | 323 localized_strings->SetString( |
| 326 "productCopyright", | 324 "productCopyright", |
| 327 l10n_util::GetStringFUTF16(IDS_ABOUT_VERSION_COPYRIGHT, | 325 base::i18n::MessageFormatter::FormatWithNumberedArgs( |
| 328 base::IntToString16(exploded_time.year))); | 326 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COPYRIGHT), |
| 327 base::Time::Now())); | |
| 329 | 328 |
| 330 base::string16 license = l10n_util::GetStringFUTF16( | 329 base::string16 license = l10n_util::GetStringFUTF16( |
| 331 IDS_VERSION_UI_LICENSE, base::ASCIIToUTF16(chrome::kChromiumProjectURL), | 330 IDS_VERSION_UI_LICENSE, base::ASCIIToUTF16(chrome::kChromiumProjectURL), |
| 332 base::ASCIIToUTF16(chrome::kChromeUICreditsURL)); | 331 base::ASCIIToUTF16(chrome::kChromeUICreditsURL)); |
| 333 localized_strings->SetString("productLicense", license); | 332 localized_strings->SetString("productLicense", license); |
| 334 | 333 |
| 335 #if defined(OS_CHROMEOS) | 334 #if defined(OS_CHROMEOS) |
| 336 base::string16 os_license = l10n_util::GetStringFUTF16( | 335 base::string16 os_license = l10n_util::GetStringFUTF16( |
| 337 IDS_ABOUT_CROS_VERSION_LICENSE, | 336 IDS_ABOUT_CROS_VERSION_LICENSE, |
| 338 base::ASCIIToUTF16(chrome::kChromeUIOSCreditsURL)); | 337 base::ASCIIToUTF16(chrome::kChromeUIOSCreditsURL)); |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 739 } | 738 } |
| 740 | 739 |
| 741 void HelpHandler::OnRegulatoryLabelTextRead(const std::string& text) { | 740 void HelpHandler::OnRegulatoryLabelTextRead(const std::string& text) { |
| 742 // Remove unnecessary whitespace. | 741 // Remove unnecessary whitespace. |
| 743 web_ui()->CallJavascriptFunction( | 742 web_ui()->CallJavascriptFunction( |
| 744 "help.HelpPage.setRegulatoryLabelText", | 743 "help.HelpPage.setRegulatoryLabelText", |
| 745 base::StringValue(base::CollapseWhitespaceASCII(text, true))); | 744 base::StringValue(base::CollapseWhitespaceASCII(text, true))); |
| 746 } | 745 } |
| 747 | 746 |
| 748 #endif // defined(OS_CHROMEOS) | 747 #endif // defined(OS_CHROMEOS) |
| OLD | NEW |