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

Unified Diff: ui/base/l10n/time_format.cc

Issue 100303003: Move more uses of string16 to specify base:: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « ui/base/l10n/time_format.h ('k') | ui/base/resource/resource_bundle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/l10n/time_format.cc
diff --git a/ui/base/l10n/time_format.cc b/ui/base/l10n/time_format.cc
index aaa35a99699c377112a1c4072aaf516ac020063f..f3b16a3f969ac1115b642550d5146660ce1b7ea3 100644
--- a/ui/base/l10n/time_format.cc
+++ b/ui/base/l10n/time_format.cc
@@ -281,10 +281,10 @@ icu::PluralFormat* TimeFormatter::createFallbackFormat(
return format;
}
-string16 FormatTimeImpl(const TimeDelta& delta, FormatType format_type) {
+base::string16 FormatTimeImpl(const TimeDelta& delta, FormatType format_type) {
if (delta.ToInternalValue() < 0) {
NOTREACHED() << "Negative duration";
- return string16();
+ return base::string16();
}
int number;
@@ -323,7 +323,7 @@ string16 FormatTimeImpl(const TimeDelta& delta, FormatType format_type) {
DCHECK(U_SUCCESS(error));
int capacity = time_string.length() + 1;
DCHECK_GT(capacity, 1);
- string16 result;
+ base::string16 result;
time_string.extract(static_cast<UChar*>(WriteInto(&result, capacity)),
capacity, error);
DCHECK(U_SUCCESS(error));
@@ -335,32 +335,32 @@ string16 FormatTimeImpl(const TimeDelta& delta, FormatType format_type) {
namespace ui {
// static
-string16 TimeFormat::TimeElapsed(const TimeDelta& delta) {
+base::string16 TimeFormat::TimeElapsed(const TimeDelta& delta) {
return FormatTimeImpl(delta, FORMAT_ELAPSED);
}
// static
-string16 TimeFormat::TimeRemaining(const TimeDelta& delta) {
+base::string16 TimeFormat::TimeRemaining(const TimeDelta& delta) {
return FormatTimeImpl(delta, FORMAT_REMAINING);
}
// static
-string16 TimeFormat::TimeRemainingLong(const TimeDelta& delta) {
+base::string16 TimeFormat::TimeRemainingLong(const TimeDelta& delta) {
return FormatTimeImpl(delta, FORMAT_REMAINING_LONG);
}
// static
-string16 TimeFormat::TimeRemainingShort(const TimeDelta& delta) {
+base::string16 TimeFormat::TimeRemainingShort(const TimeDelta& delta) {
return FormatTimeImpl(delta, FORMAT_SHORT);
}
// static
-string16 TimeFormat::TimeDurationLong(const TimeDelta& delta) {
+base::string16 TimeFormat::TimeDurationLong(const TimeDelta& delta) {
return FormatTimeImpl(delta, FORMAT_DURATION_LONG);
}
// static
-string16 TimeFormat::RelativeDate(
+base::string16 TimeFormat::RelativeDate(
const Time& time,
const Time* optional_midnight_today) {
Time midnight_today = optional_midnight_today ? *optional_midnight_today :
@@ -369,12 +369,12 @@ string16 TimeFormat::RelativeDate(
Time tomorrow = midnight_today + day;
Time yesterday = midnight_today - day;
if (time >= tomorrow)
- return string16();
+ return base::string16();
else if (time >= midnight_today)
return l10n_util::GetStringUTF16(IDS_PAST_TIME_TODAY);
else if (time >= yesterday)
return l10n_util::GetStringUTF16(IDS_PAST_TIME_YESTERDAY);
- return string16();
+ return base::string16();
}
} // namespace ui
« no previous file with comments | « ui/base/l10n/time_format.h ('k') | ui/base/resource/resource_bundle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698