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

Side by Side Diff: chrome/browser/ui/webui/settings/about_handler.cc

Issue 1996993002: i18n of Copyright line to use locally correct numeric glyphs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add time.h includes, as per review (also merge) Created 4 years, 6 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/browser/ui/webui/help/help_handler.cc ('k') | chrome/browser/ui/webui/version_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/settings/about_handler.h" 5 #include "chrome/browser/ui/webui/settings/about_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"
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/time/time.h"
24 #include "base/values.h" 25 #include "base/values.h"
25 #include "build/build_config.h" 26 #include "build/build_config.h"
26 #include "chrome/browser/browser_process.h" 27 #include "chrome/browser/browser_process.h"
27 #include "chrome/browser/chrome_notification_types.h" 28 #include "chrome/browser/chrome_notification_types.h"
28 #include "chrome/browser/obsolete_system/obsolete_system.h" 29 #include "chrome/browser/obsolete_system/obsolete_system.h"
29 #include "chrome/browser/ui/browser.h" 30 #include "chrome/browser/ui/browser.h"
30 #include "chrome/browser/ui/browser_commands.h" 31 #include "chrome/browser/ui/browser_commands.h"
31 #include "chrome/browser/ui/browser_finder.h" 32 #include "chrome/browser/ui/browser_finder.h"
32 #include "chrome/browser/ui/chrome_pages.h" 33 #include "chrome/browser/ui/chrome_pages.h"
33 #include "chrome/common/channel_info.h" 34 #include "chrome/common/channel_info.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 260
260 AboutHandler::~AboutHandler() {} 261 AboutHandler::~AboutHandler() {}
261 262
262 AboutHandler* AboutHandler::Create(content::WebUIDataSource* html_source, 263 AboutHandler* AboutHandler::Create(content::WebUIDataSource* html_source,
263 Profile* profile) { 264 Profile* profile) {
264 html_source->AddString( 265 html_source->AddString(
265 "aboutBrowserVersion", 266 "aboutBrowserVersion",
266 l10n_util::GetStringFUTF16(IDS_ABOUT_PRODUCT_VERSION, 267 l10n_util::GetStringFUTF16(IDS_ABOUT_PRODUCT_VERSION,
267 BuildBrowserVersionString())); 268 BuildBrowserVersionString()));
268 269
269 base::Time::Exploded exploded_time;
270 base::Time::Now().LocalExplode(&exploded_time);
271 html_source->AddString( 270 html_source->AddString(
272 "aboutProductCopyright", 271 "aboutProductCopyright",
273 l10n_util::GetStringFUTF16(IDS_ABOUT_VERSION_COPYRIGHT, 272 base::i18n::MessageFormatter::FormatWithNumberedArgs(
274 base::IntToString16(exploded_time.year))); 273 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COPYRIGHT),
274 base::Time::Now()));
275 275
276 base::string16 license = l10n_util::GetStringFUTF16( 276 base::string16 license = l10n_util::GetStringFUTF16(
277 IDS_VERSION_UI_LICENSE, base::ASCIIToUTF16(chrome::kChromiumProjectURL), 277 IDS_VERSION_UI_LICENSE, base::ASCIIToUTF16(chrome::kChromiumProjectURL),
278 base::ASCIIToUTF16(chrome::kChromeUICreditsURL)); 278 base::ASCIIToUTF16(chrome::kChromeUICreditsURL));
279 html_source->AddString("aboutProductLicense", license); 279 html_source->AddString("aboutProductLicense", license);
280 280
281 html_source->AddBoolean("aboutObsolteNowOrSoon", 281 html_source->AddBoolean("aboutObsolteNowOrSoon",
282 ObsoleteSystem::IsObsoleteNowOrSoon()); 282 ObsoleteSystem::IsObsoleteNowOrSoon());
283 html_source->AddBoolean("aboutObsolteEndOfTheLine", 283 html_source->AddBoolean("aboutObsolteEndOfTheLine",
284 ObsoleteSystem::IsObsoleteNowOrSoon() && 284 ObsoleteSystem::IsObsoleteNowOrSoon() &&
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 std::string url = std::string("chrome://") + chrome::kChromeOSAssetHost + 653 std::string url = std::string("chrome://") + chrome::kChromeOSAssetHost +
654 "/" + path.MaybeAsASCII(); 654 "/" + path.MaybeAsASCII();
655 regulatory_info->SetString("url", url); 655 regulatory_info->SetString("url", url);
656 656
657 ResolveJavascriptCallback(base::StringValue(callback_id), *regulatory_info); 657 ResolveJavascriptCallback(base::StringValue(callback_id), *regulatory_info);
658 } 658 }
659 659
660 #endif // defined(OS_CHROMEOS) 660 #endif // defined(OS_CHROMEOS)
661 661
662 } // namespace settings 662 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/help/help_handler.cc ('k') | chrome/browser/ui/webui/version_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698