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

Unified Diff: ios/chrome/browser/notification_promo_unittest.cc

Issue 2740673002: Prepare Chromium and Blink for ICU 59 (Closed)
Patch Set: revert accidental revert of sftnly roll during rebase Created 3 years, 9 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 | « content/renderer/android/email_detector.cc ('k') | net/ftp/ftp_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/notification_promo_unittest.cc
diff --git a/ios/chrome/browser/notification_promo_unittest.cc b/ios/chrome/browser/notification_promo_unittest.cc
index 830d9c5f65a02412b9a60cd4a6e142bd19bb47d9..d5356e8e6dcbd2ff4e31404b892ffd9bd4927e37 100644
--- a/ios/chrome/browser/notification_promo_unittest.cc
+++ b/ios/chrome/browser/notification_promo_unittest.cc
@@ -34,18 +34,14 @@ bool YearFromNow(double* date_epoch, std::string* date_string) {
UErrorCode status = U_ZERO_ERROR;
icu::SimpleDateFormat simple_formatter(icu::UnicodeString(kDateFormat),
icu::Locale("en_US"), status);
- if (!U_SUCCESS(status))
- return false;
-
icu::UnicodeString date_unicode_string;
simple_formatter.format(static_cast<UDate>(*date_epoch * 1000),
date_unicode_string, status);
- if (!U_SUCCESS(status))
+ if (U_FAILURE(status))
return false;
- return base::UTF16ToUTF8(date_unicode_string.getBuffer(),
- static_cast<size_t>(date_unicode_string.length()),
- date_string);
+ date_unicode_string.toUTF8String(*date_string);
+ return true;
}
} // namespace
« no previous file with comments | « content/renderer/android/email_detector.cc ('k') | net/ftp/ftp_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698