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

Unified Diff: base/time_format.cc

Issue 171012: Use 'icu::' namespace explicitly (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/string_util_icu.cc ('k') | chrome/browser/bookmarks/bookmark_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time_format.cc
===================================================================
--- base/time_format.cc (revision 23559)
+++ base/time_format.cc (working copy)
@@ -14,10 +14,10 @@
namespace {
-std::wstring TimeFormat(const DateFormat* formatter,
+std::wstring TimeFormat(const icu::DateFormat* formatter,
const Time& time) {
DCHECK(formatter);
- UnicodeString date_string;
+ icu::UnicodeString date_string;
formatter->format(static_cast<UDate>(time.ToDoubleT() * 1000), date_string);
std::wstring output;
@@ -34,38 +34,38 @@
std::wstring TimeFormatTimeOfDay(const Time& time) {
// We can omit the locale parameter because the default should match
// Chrome's application locale.
- scoped_ptr<DateFormat> formatter(DateFormat::createTimeInstance(
- DateFormat::kShort));
+ scoped_ptr<icu::DateFormat> formatter(
+ icu::DateFormat::createTimeInstance(icu::DateFormat::kShort));
return TimeFormat(formatter.get(), time);
}
std::wstring TimeFormatShortDate(const Time& time) {
- scoped_ptr<DateFormat> formatter(DateFormat::createDateInstance(
- DateFormat::kMedium));
+ scoped_ptr<icu::DateFormat> formatter(
+ icu::DateFormat::createDateInstance(icu::DateFormat::kMedium));
return TimeFormat(formatter.get(), time);
}
std::wstring TimeFormatShortDateNumeric(const Time& time) {
- scoped_ptr<DateFormat> formatter(DateFormat::createDateInstance(
- DateFormat::kShort));
+ scoped_ptr<icu::DateFormat> formatter(
+ icu::DateFormat::createDateInstance(icu::DateFormat::kShort));
return TimeFormat(formatter.get(), time);
}
std::wstring TimeFormatShortDateAndTime(const Time& time) {
- scoped_ptr<DateFormat> formatter(DateFormat::createDateTimeInstance(
- DateFormat::kShort));
+ scoped_ptr<icu::DateFormat> formatter(
+ icu::DateFormat::createDateTimeInstance(icu::DateFormat::kShort));
return TimeFormat(formatter.get(), time);
}
std::wstring TimeFormatFriendlyDateAndTime(const Time& time) {
- scoped_ptr<DateFormat> formatter(DateFormat::createDateTimeInstance(
- DateFormat::kFull));
+ scoped_ptr<icu::DateFormat> formatter(
+ icu::DateFormat::createDateTimeInstance(icu::DateFormat::kFull));
return TimeFormat(formatter.get(), time);
}
std::wstring TimeFormatFriendlyDate(const Time& time) {
- scoped_ptr<DateFormat> formatter(DateFormat::createDateInstance(
- DateFormat::kFull));
+ scoped_ptr<icu::DateFormat> formatter(icu::DateFormat::createDateInstance(
+ icu::DateFormat::kFull));
return TimeFormat(formatter.get(), time);
}
« no previous file with comments | « base/string_util_icu.cc ('k') | chrome/browser/bookmarks/bookmark_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698