Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: chrome/browser/ui/webui/help/help_handler.cc

Issue 1861813003: Display device specific up to date message on chromebook. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/app/google_chrome_strings.grd ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 {"updating", IDS_UPGRADE_UPDATING}, 240 {"updating", IDS_UPGRADE_UPDATING},
241 #if defined(OS_CHROMEOS) || defined(OS_WIN) 241 #if defined(OS_CHROMEOS) || defined(OS_WIN)
242 {"updateDisabledByPolicy", IDS_UPGRADE_DISABLED_BY_POLICY}, 242 {"updateDisabledByPolicy", IDS_UPGRADE_DISABLED_BY_POLICY},
243 #endif // defined(OS_CHROMEOS) || defined(OS_WIN) 243 #endif // defined(OS_CHROMEOS) || defined(OS_WIN)
244 #if defined(OS_CHROMEOS) 244 #if defined(OS_CHROMEOS)
245 {"updateButton", IDS_UPGRADE_BUTTON}, 245 {"updateButton", IDS_UPGRADE_BUTTON},
246 {"updatingChannelSwitch", IDS_UPGRADE_UPDATING_CHANNEL_SWITCH}, 246 {"updatingChannelSwitch", IDS_UPGRADE_UPDATING_CHANNEL_SWITCH},
247 #endif 247 #endif
248 {"updateAlmostDone", IDS_UPGRADE_SUCCESSFUL_RELAUNCH}, 248 {"updateAlmostDone", IDS_UPGRADE_SUCCESSFUL_RELAUNCH},
249 #if defined(OS_CHROMEOS) 249 #if defined(OS_CHROMEOS)
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 #if defined(OS_MACOSX) 294 #if defined(OS_MACOSX)
295 {"promote", IDS_ABOUT_CHROME_PROMOTE_UPDATER}, 295 {"promote", IDS_ABOUT_CHROME_PROMOTE_UPDATER},
296 #endif 296 #endif
297 }; 297 };
298 298
299 for (size_t i = 0; i < arraysize(resources); ++i) { 299 for (size_t i = 0; i < arraysize(resources); ++i) {
300 localized_strings->SetString(resources[i].name, 300 localized_strings->SetString(resources[i].name,
301 l10n_util::GetStringUTF16(resources[i].ids)); 301 l10n_util::GetStringUTF16(resources[i].ids));
302 } 302 }
303 303
304 #if defined(OS_CHROMEOS)
305 localized_strings->SetString("upToDate", ash::SubstituteChromeOSDeviceType(
306 IDS_UPGRADE_UP_TO_DATE));
307 #else
308 localized_strings->SetString("upToDate", l10n_util::GetStringUTF16(
309 IDS_UPGRADE_UP_TO_DATE));
310 #endif
311
304 localized_strings->SetString("updateObsoleteSystem", 312 localized_strings->SetString("updateObsoleteSystem",
305 ObsoleteSystem::LocalizedObsoleteString()); 313 ObsoleteSystem::LocalizedObsoleteString());
306 localized_strings->SetString("updateObsoleteSystemURL", 314 localized_strings->SetString("updateObsoleteSystemURL",
307 ObsoleteSystem::GetLinkURL()); 315 ObsoleteSystem::GetLinkURL());
308 316
309 localized_strings->SetString( 317 localized_strings->SetString(
310 "browserVersion", 318 "browserVersion",
311 l10n_util::GetStringFUTF16(IDS_ABOUT_PRODUCT_VERSION, 319 l10n_util::GetStringFUTF16(IDS_ABOUT_PRODUCT_VERSION,
312 BuildBrowserVersionString())); 320 BuildBrowserVersionString()));
313 321
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 } 727 }
720 728
721 void HelpHandler::OnRegulatoryLabelTextRead(const std::string& text) { 729 void HelpHandler::OnRegulatoryLabelTextRead(const std::string& text) {
722 // Remove unnecessary whitespace. 730 // Remove unnecessary whitespace.
723 web_ui()->CallJavascriptFunction( 731 web_ui()->CallJavascriptFunction(
724 "help.HelpPage.setRegulatoryLabelText", 732 "help.HelpPage.setRegulatoryLabelText",
725 base::StringValue(base::CollapseWhitespaceASCII(text, true))); 733 base::StringValue(base::CollapseWhitespaceASCII(text, true)));
726 } 734 }
727 735
728 #endif // defined(OS_CHROMEOS) 736 #endif // defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/app/google_chrome_strings.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698