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 "base/bind.h" | 12 #include "base/bind.h" |
| 12 #include "base/bind_helpers.h" | 13 #include "base/bind_helpers.h" |
| 13 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 14 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 15 #include "base/files/file_util.h" | 16 #include "base/files/file_util.h" |
| 16 #include "base/location.h" | 17 #include "base/location.h" |
| 17 #include "base/macros.h" | 18 #include "base/macros.h" |
| 18 #include "base/strings/string16.h" | 19 #include "base/strings/string16.h" |
| 19 #include "base/strings/string_number_conversions.h" | 20 #include "base/strings/string_number_conversions.h" |
| 20 #include "base/strings/string_util.h" | 21 #include "base/strings/string_util.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 229 #else | 230 #else |
| 230 {"aboutProductTitle", IDS_PRODUCT_NAME}, | 231 {"aboutProductTitle", IDS_PRODUCT_NAME}, |
| 231 #endif | 232 #endif |
| 232 {"aboutProductDescription", IDS_ABOUT_PRODUCT_DESCRIPTION}, | 233 {"aboutProductDescription", IDS_ABOUT_PRODUCT_DESCRIPTION}, |
| 233 {"relaunch", IDS_RELAUNCH_BUTTON}, | 234 {"relaunch", IDS_RELAUNCH_BUTTON}, |
| 234 #if defined(OS_CHROMEOS) | 235 #if defined(OS_CHROMEOS) |
| 235 {"relaunchAndPowerwash", IDS_RELAUNCH_AND_POWERWASH_BUTTON}, | 236 {"relaunchAndPowerwash", IDS_RELAUNCH_AND_POWERWASH_BUTTON}, |
| 236 #endif | 237 #endif |
| 237 {"productName", IDS_PRODUCT_NAME}, | 238 {"productName", IDS_PRODUCT_NAME}, |
| 238 {"updateCheckStarted", IDS_UPGRADE_CHECK_STARTED}, | 239 {"updateCheckStarted", IDS_UPGRADE_CHECK_STARTED}, |
| 239 {"upToDate", IDS_UPGRADE_UP_TO_DATE}, | 240 {"upToDate", IDS_UPGRADE_UP_TO_DATE}, |
|
jdufault
2016/04/05 23:39:06
Put this next to the other upToDate string inserti
malaykeshav
2016/04/06 19:05:24
Done.
| |
| 240 {"updating", IDS_UPGRADE_UPDATING}, | 241 {"updating", IDS_UPGRADE_UPDATING}, |
| 241 #if defined(OS_CHROMEOS) || defined(OS_WIN) | 242 #if defined(OS_CHROMEOS) || defined(OS_WIN) |
| 242 {"updateDisabledByPolicy", IDS_UPGRADE_DISABLED_BY_POLICY}, | 243 {"updateDisabledByPolicy", IDS_UPGRADE_DISABLED_BY_POLICY}, |
| 243 #endif // defined(OS_CHROMEOS) || defined(OS_WIN) | 244 #endif // defined(OS_CHROMEOS) || defined(OS_WIN) |
| 244 #if defined(OS_CHROMEOS) | 245 #if defined(OS_CHROMEOS) |
| 245 {"updateButton", IDS_UPGRADE_BUTTON}, | 246 {"updateButton", IDS_UPGRADE_BUTTON}, |
| 246 {"updatingChannelSwitch", IDS_UPGRADE_UPDATING_CHANNEL_SWITCH}, | 247 {"updatingChannelSwitch", IDS_UPGRADE_UPDATING_CHANNEL_SWITCH}, |
| 247 #endif | 248 #endif |
| 248 {"updateAlmostDone", IDS_UPGRADE_SUCCESSFUL_RELAUNCH}, | 249 {"updateAlmostDone", IDS_UPGRADE_SUCCESSFUL_RELAUNCH}, |
| 249 #if defined(OS_CHROMEOS) | 250 #if defined(OS_CHROMEOS) |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 294 #if defined(OS_MACOSX) | 295 #if defined(OS_MACOSX) |
| 295 {"promote", IDS_ABOUT_CHROME_PROMOTE_UPDATER}, | 296 {"promote", IDS_ABOUT_CHROME_PROMOTE_UPDATER}, |
| 296 #endif | 297 #endif |
| 297 }; | 298 }; |
| 298 | 299 |
| 299 for (size_t i = 0; i < arraysize(resources); ++i) { | 300 for (size_t i = 0; i < arraysize(resources); ++i) { |
| 300 localized_strings->SetString(resources[i].name, | 301 localized_strings->SetString(resources[i].name, |
| 301 l10n_util::GetStringUTF16(resources[i].ids)); | 302 l10n_util::GetStringUTF16(resources[i].ids)); |
| 302 } | 303 } |
| 303 | 304 |
| 305 #if defined(OS_CHROMEOS) | |
| 306 localized_strings->SetString("upToDate", ash::SubstituteChromeOSDeviceType( | |
| 307 IDS_UPGRADE_UP_TO_DATE)); | |
| 308 #endif | |
| 309 | |
| 304 localized_strings->SetString("updateObsoleteSystem", | 310 localized_strings->SetString("updateObsoleteSystem", |
| 305 ObsoleteSystem::LocalizedObsoleteString()); | 311 ObsoleteSystem::LocalizedObsoleteString()); |
| 306 localized_strings->SetString("updateObsoleteSystemURL", | 312 localized_strings->SetString("updateObsoleteSystemURL", |
| 307 ObsoleteSystem::GetLinkURL()); | 313 ObsoleteSystem::GetLinkURL()); |
| 308 | 314 |
| 309 localized_strings->SetString( | 315 localized_strings->SetString( |
| 310 "browserVersion", | 316 "browserVersion", |
| 311 l10n_util::GetStringFUTF16(IDS_ABOUT_PRODUCT_VERSION, | 317 l10n_util::GetStringFUTF16(IDS_ABOUT_PRODUCT_VERSION, |
| 312 BuildBrowserVersionString())); | 318 BuildBrowserVersionString())); |
| 313 | 319 |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 719 } | 725 } |
| 720 | 726 |
| 721 void HelpHandler::OnRegulatoryLabelTextRead(const std::string& text) { | 727 void HelpHandler::OnRegulatoryLabelTextRead(const std::string& text) { |
| 722 // Remove unnecessary whitespace. | 728 // Remove unnecessary whitespace. |
| 723 web_ui()->CallJavascriptFunction( | 729 web_ui()->CallJavascriptFunction( |
| 724 "help.HelpPage.setRegulatoryLabelText", | 730 "help.HelpPage.setRegulatoryLabelText", |
| 725 base::StringValue(base::CollapseWhitespaceASCII(text, true))); | 731 base::StringValue(base::CollapseWhitespaceASCII(text, true))); |
| 726 } | 732 } |
| 727 | 733 |
| 728 #endif // defined(OS_CHROMEOS) | 734 #endif // defined(OS_CHROMEOS) |
| OLD | NEW |