icu68.patch 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. From 4d16e52a5e6771c4aa5f892e14486bf0e87027d1 Mon Sep 17 00:00:00 2001
  2. From: Frank Tang <ftang@chromium.org>
  3. Date: Tue, 20 Oct 2020 00:11:50 +0000
  4. Subject: [PATCH] Prepare for landing ICU68
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. In the landing process of ICU68 we found these need to be changed
  9. since ICU68 no longer define TRUE and FALSE for UBool to
  10. avoid C++20 problem.
  11. Bug: 1138555
  12. Change-Id: I64fd98c99864aa86b07280537a780105cb0eabbe
  13. Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2473522
  14. Reviewed-by: Frank Tang <ftang@chromium.org>
  15. Reviewed-by: Colin Blundell <blundell@chromium.org>
  16. Reviewed-by: Dominic Battré <battre@chromium.org>
  17. Reviewed-by: Guillaume Jenkins <gujen@google.com>
  18. Reviewed-by: Jungshik Shin <jshin@chromium.org>
  19. Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
  20. Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
  21. Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
  22. Reviewed-by: Marian Fechete <marianfe@google.com>
  23. Reviewed-by: Matthew Denton <mpdenton@chromium.org>
  24. Commit-Queue: Frank Tang <ftang@chromium.org>
  25. Cr-Commit-Position: refs/heads/master@{#818713}
  26. ---
  27. base/i18n/icu_util.cc | 2 +-
  28. base/i18n/string_compare.cc | 4 ++--
  29. base/i18n/time_formatting.cc | 2 +-
  30. .../autofill/core/common/autofill_regexes.cc | 8 ++++----
  31. .../browser/string_conversions_util.cc | 6 +++---
  32. .../public/identity_manager/identity_utils.cc | 2 +-
  33. .../renderer/spellcheck_worditerator.cc | 2 +-
  34. .../spoof_checks/idn_spoof_checker.cc | 4 ++--
  35. .../spoof_checks/skeleton_generator.cc | 2 +-
  36. content/zygote/zygote_linux.cc | 2 +-
  37. .../time_zone_monitor_android.cc | 2 +-
  38. .../renderer/core/exported/web_view_test.cc | 12 ++++++------
  39. .../blink/renderer/platform/text/locale_icu.cc | 4 ++--
  40. .../platform/text/text_break_iterator_icu.cc | 16 ++++++++--------
  41. .../renderer/platform/text/unicode_utilities.cc | 2 +-
  42. .../renderer/platform/wtf/text/text_codec_icu.cc | 2 +-
  43. ui/base/l10n/formatter.cc | 6 +++---
  44. 17 files changed, 39 insertions(+), 39 deletions(-)
  45. diff --git a/base/i18n/icu_util.cc b/base/i18n/icu_util.cc
  46. index b225f1d46c0b7..20debbe655c46 100644
  47. --- a/base/i18n/icu_util.cc
  48. +++ b/base/i18n/icu_util.cc
  49. @@ -327,7 +327,7 @@ void InitializeIcuTimeZone() {
  50. // https://ssl.icu-project.org/trac/ticket/13208 .
  51. string16 zone_id = android::GetDefaultTimeZoneId();
  52. icu::TimeZone::adoptDefault(icu::TimeZone::createTimeZone(
  53. - icu::UnicodeString(FALSE, zone_id.data(), zone_id.length())));
  54. + icu::UnicodeString(false, zone_id.data(), zone_id.length())));
  55. #elif defined(OS_FUCHSIA)
  56. // The platform-specific mechanisms used by ICU's detectHostTimeZone() to
  57. // determine the default time zone will not work on Fuchsia. Therefore,
  58. diff --git a/base/i18n/string_compare.cc b/base/i18n/string_compare.cc
  59. index c0e83c6f7306f..e4fb687c14884 100644
  60. --- a/base/i18n/string_compare.cc
  61. +++ b/base/i18n/string_compare.cc
  62. @@ -18,8 +18,8 @@ UCollationResult CompareString16WithCollator(const icu::Collator& collator,
  63. StringPiece16 rhs) {
  64. UErrorCode error = U_ZERO_ERROR;
  65. UCollationResult result = collator.compare(
  66. - icu::UnicodeString(FALSE, lhs.data(), static_cast<int>(lhs.length())),
  67. - icu::UnicodeString(FALSE, rhs.data(), static_cast<int>(rhs.length())),
  68. + icu::UnicodeString(false, lhs.data(), static_cast<int>(lhs.length())),
  69. + icu::UnicodeString(false, rhs.data(), static_cast<int>(rhs.length())),
  70. error);
  71. DCHECK(U_SUCCESS(error));
  72. return result;
  73. diff --git a/base/i18n/time_formatting.cc b/base/i18n/time_formatting.cc
  74. index c769b57d7162a..c085f5ef2448a 100644
  75. --- a/base/i18n/time_formatting.cc
  76. +++ b/base/i18n/time_formatting.cc
  77. @@ -240,7 +240,7 @@ bool TimeDurationFormatWithSeconds(const TimeDelta time,
  78. icu::FieldPosition ignore(icu::FieldPosition::DONT_CARE);
  79. measure_format.formatMeasures(measures, 3, formatted, ignore, status);
  80. *out = i18n::UnicodeStringToString16(formatted);
  81. - return U_SUCCESS(status) == TRUE;
  82. + return U_SUCCESS(status);
  83. }
  84. string16 DateIntervalFormat(const Time& begin_time,
  85. diff --git a/components/autofill/core/common/autofill_regexes.cc b/components/autofill/core/common/autofill_regexes.cc
  86. index 02254fa266ac5..1cf12f310d077 100644
  87. --- a/components/autofill/core/common/autofill_regexes.cc
  88. +++ b/components/autofill/core/common/autofill_regexes.cc
  89. @@ -43,7 +43,7 @@ class AutofillRegexes {
  90. icu::RegexMatcher* AutofillRegexes::GetMatcher(const base::string16& pattern) {
  91. auto it = matchers_.find(pattern);
  92. if (it == matchers_.end()) {
  93. - const icu::UnicodeString icu_pattern(FALSE, pattern.data(),
  94. + const icu::UnicodeString icu_pattern(false, pattern.data(),
  95. pattern.length());
  96. UErrorCode status = U_ZERO_ERROR;
  97. @@ -71,21 +71,21 @@ bool MatchesPattern(const base::string16& input,
  98. base::AutoLock lock(*g_lock);
  99. icu::RegexMatcher* matcher = g_autofill_regexes->GetMatcher(pattern);
  100. - icu::UnicodeString icu_input(FALSE, input.data(), input.length());
  101. + icu::UnicodeString icu_input(false, input.data(), input.length());
  102. matcher->reset(icu_input);
  103. UErrorCode status = U_ZERO_ERROR;
  104. UBool matched = matcher->find(0, status);
  105. DCHECK(U_SUCCESS(status));
  106. - if (matched == TRUE && match) {
  107. + if (matched && match) {
  108. icu::UnicodeString match_unicode =
  109. matcher->group(group_to_be_captured, status);
  110. DCHECK(U_SUCCESS(status));
  111. *match = base::i18n::UnicodeStringToString16(match_unicode);
  112. }
  113. - return matched == TRUE;
  114. + return matched;
  115. }
  116. } // namespace autofill
  117. diff --git a/components/autofill_assistant/browser/string_conversions_util.cc b/components/autofill_assistant/browser/string_conversions_util.cc
  118. index 212bafa637288..1d00d68019fa3 100644
  119. --- a/components/autofill_assistant/browser/string_conversions_util.cc
  120. +++ b/components/autofill_assistant/browser/string_conversions_util.cc
  121. @@ -39,13 +39,13 @@ bool UnicodeToUTF8(const std::vector<UChar32>& source, std::string* target) {
  122. // |target|.
  123. bool AppendUnicodeToUTF8(const UChar32 source, std::string* target) {
  124. char bytes[4];
  125. - UBool error = FALSE;
  126. + UBool error = false;
  127. size_t offset = 0;
  128. U8_APPEND(bytes, offset, base::size(bytes), source, error);
  129. - if (error == FALSE) {
  130. + if (error == false) {
  131. target->append(bytes, offset);
  132. }
  133. - return error == FALSE;
  134. + return !error;
  135. }
  136. } // namespace autofill_assistant
  137. diff --git a/components/signin/public/identity_manager/identity_utils.cc b/components/signin/public/identity_manager/identity_utils.cc
  138. index 1c414e20e5de4..014d6746d95f2 100644
  139. --- a/components/signin/public/identity_manager/identity_utils.cc
  140. +++ b/components/signin/public/identity_manager/identity_utils.cc
  141. @@ -33,7 +33,7 @@ bool IsUsernameAllowedByPattern(base::StringPiece username,
  142. // See if the username matches the policy-provided pattern.
  143. UErrorCode status = U_ZERO_ERROR;
  144. - const icu::UnicodeString icu_pattern(FALSE, utf16_pattern.data(),
  145. + const icu::UnicodeString icu_pattern(false, utf16_pattern.data(),
  146. utf16_pattern.length());
  147. icu::RegexMatcher matcher(icu_pattern, UREGEX_CASE_INSENSITIVE, status);
  148. if (!U_SUCCESS(status)) {
  149. diff --git a/components/spellcheck/renderer/spellcheck_worditerator.cc b/components/spellcheck/renderer/spellcheck_worditerator.cc
  150. index ec16fefbebc91..3b1f060866021 100644
  151. --- a/components/spellcheck/renderer/spellcheck_worditerator.cc
  152. +++ b/components/spellcheck/renderer/spellcheck_worditerator.cc
  153. @@ -442,7 +442,7 @@ bool SpellcheckWordIterator::Normalize(size_t input_start,
  154. // spellchecker and we need manual normalization as well. The normalized
  155. // text does not have to be NUL-terminated since its characters are copied to
  156. // string16, which adds a NUL character when we need.
  157. - icu::UnicodeString input(FALSE, &text_[input_start],
  158. + icu::UnicodeString input(false, &text_[input_start],
  159. base::checked_cast<int32_t>(input_length));
  160. UErrorCode status = U_ZERO_ERROR;
  161. icu::UnicodeString output;
  162. diff --git a/components/url_formatter/spoof_checks/idn_spoof_checker.cc b/components/url_formatter/spoof_checks/idn_spoof_checker.cc
  163. index 6d66a7c4db885..d73192b1426a4 100644
  164. --- a/components/url_formatter/spoof_checks/idn_spoof_checker.cc
  165. +++ b/components/url_formatter/spoof_checks/idn_spoof_checker.cc
  166. @@ -368,7 +368,7 @@ IDNSpoofChecker::Result IDNSpoofChecker::SafeToDisplayAsUnicode(
  167. return Result::kICUSpoofChecks;
  168. }
  169. - icu::UnicodeString label_string(FALSE /* isTerminated */, label.data(),
  170. + icu::UnicodeString label_string(false /* isTerminated */, label.data(),
  171. base::checked_cast<int32_t>(label.size()));
  172. // A punycode label with 'xn--' prefix is not subject to the URL
  173. @@ -711,7 +711,7 @@ bool IDNSpoofChecker::IsWholeScriptConfusableAllowedForTLD(
  174. base::StringPiece tld,
  175. base::StringPiece16 tld_unicode) {
  176. icu::UnicodeString tld_string(
  177. - FALSE /* isTerminated */, tld_unicode.data(),
  178. + false /* isTerminated */, tld_unicode.data(),
  179. base::checked_cast<int32_t>(tld_unicode.size()));
  180. // Allow if the TLD contains any letter from the script, in which case it's
  181. // likely to be a TLD in that script.
  182. diff --git a/components/url_formatter/spoof_checks/skeleton_generator.cc b/components/url_formatter/spoof_checks/skeleton_generator.cc
  183. index 9628626600df5..9a779018ebfae 100644
  184. --- a/components/url_formatter/spoof_checks/skeleton_generator.cc
  185. +++ b/components/url_formatter/spoof_checks/skeleton_generator.cc
  186. @@ -116,7 +116,7 @@ SkeletonGenerator::~SkeletonGenerator() = default;
  187. Skeletons SkeletonGenerator::GetSkeletons(base::StringPiece16 hostname) {
  188. Skeletons skeletons;
  189. size_t hostname_length = hostname.length() - (hostname.back() == '.' ? 1 : 0);
  190. - icu::UnicodeString host(FALSE, hostname.data(), hostname_length);
  191. + icu::UnicodeString host(false, hostname.data(), hostname_length);
  192. // If input has any characters outside Latin-Greek-Cyrillic and [0-9._-],
  193. // there is no point in getting rid of diacritics because combining marks
  194. // attached to non-LGC characters are already blocked.
  195. diff --git a/content/zygote/zygote_linux.cc b/content/zygote/zygote_linux.cc
  196. index 95d5a82c25082..b6d8e5a29c55e 100644
  197. --- a/content/zygote/zygote_linux.cc
  198. +++ b/content/zygote/zygote_linux.cc
  199. @@ -557,7 +557,7 @@ base::ProcessId Zygote::ReadArgsAndFork(base::PickleIterator iter,
  200. if (!iter.ReadString16(&timezone_id))
  201. return -1;
  202. icu::TimeZone::adoptDefault(icu::TimeZone::createTimeZone(
  203. - icu::UnicodeString(FALSE, timezone_id.data(), timezone_id.length())));
  204. + icu::UnicodeString(false, timezone_id.data(), timezone_id.length())));
  205. if (!iter.ReadInt(&numfds))
  206. return -1;
  207. diff --git a/services/device/time_zone_monitor/time_zone_monitor_android.cc b/services/device/time_zone_monitor/time_zone_monitor_android.cc
  208. index 818670a821e41..f57f9724e5d48 100644
  209. --- a/services/device/time_zone_monitor/time_zone_monitor_android.cc
  210. +++ b/services/device/time_zone_monitor/time_zone_monitor_android.cc
  211. @@ -34,7 +34,7 @@ void TimeZoneMonitorAndroid::TimeZoneChangedFromJava(
  212. // See base/i18n/icu_util.cc:InitializeIcuTimeZone() for more information.
  213. base::string16 zone_id = base::android::GetDefaultTimeZoneId();
  214. std::unique_ptr<icu::TimeZone> new_zone(icu::TimeZone::createTimeZone(
  215. - icu::UnicodeString(FALSE, zone_id.data(), zone_id.length())));
  216. + icu::UnicodeString(false, zone_id.data(), zone_id.length())));
  217. UpdateIcuAndNotifyClients(std::move(new_zone));
  218. }
  219. diff --git a/third_party/blink/renderer/core/exported/web_view_test.cc b/third_party/blink/renderer/core/exported/web_view_test.cc
  220. index a6b9552bb18d9..36809d914d1af 100644
  221. --- a/third_party/blink/renderer/core/exported/web_view_test.cc
  222. +++ b/third_party/blink/renderer/core/exported/web_view_test.cc
  223. @@ -4868,18 +4868,18 @@ TEST_F(ShowUnhandledTapTest, ShowUnhandledTapUIIfNeeded) {
  224. TEST_F(ShowUnhandledTapTest, ShowUnhandledTapUIIfNeededWithMutateDom) {
  225. // Test dom mutation.
  226. - TestEachMouseEvent("mutateDom", FALSE);
  227. + TestEachMouseEvent("mutateDom", false);
  228. // Test without any DOM mutation.
  229. - TestEachMouseEvent("none", TRUE);
  230. + TestEachMouseEvent("none", true);
  231. }
  232. TEST_F(ShowUnhandledTapTest, ShowUnhandledTapUIIfNeededWithMutateStyle) {
  233. // Test style mutation.
  234. - TestEachMouseEvent("mutateStyle", FALSE);
  235. + TestEachMouseEvent("mutateStyle", false);
  236. // Test checkbox:indeterminate style mutation.
  237. - TestEachMouseEvent("mutateIndeterminate", FALSE);
  238. + TestEachMouseEvent("mutateIndeterminate", false);
  239. // Test click div with :active style.
  240. Tap("style_active");
  241. @@ -4888,10 +4888,10 @@ TEST_F(ShowUnhandledTapTest, ShowUnhandledTapUIIfNeededWithMutateStyle) {
  242. TEST_F(ShowUnhandledTapTest, ShowUnhandledTapUIIfNeededWithPreventDefault) {
  243. // Test swallowing.
  244. - TestEachMouseEvent("preventDefault", FALSE);
  245. + TestEachMouseEvent("preventDefault", false);
  246. // Test without any preventDefault.
  247. - TestEachMouseEvent("none", TRUE);
  248. + TestEachMouseEvent("none", true);
  249. }
  250. TEST_F(ShowUnhandledTapTest, ShowUnhandledTapUIIfNeededWithNonTriggeringNodes) {
  251. diff --git a/third_party/blink/renderer/platform/text/locale_icu.cc b/third_party/blink/renderer/platform/text/locale_icu.cc
  252. index 92fb99e0cc027..f991b5137728c 100644
  253. --- a/third_party/blink/renderer/platform/text/locale_icu.cc
  254. +++ b/third_party/blink/renderer/platform/text/locale_icu.cc
  255. @@ -169,12 +169,12 @@ static String GetDateFormatPattern(const UDateFormat* date_format) {
  256. return g_empty_string;
  257. UErrorCode status = U_ZERO_ERROR;
  258. - int32_t length = udat_toPattern(date_format, TRUE, nullptr, 0, &status);
  259. + int32_t length = udat_toPattern(date_format, true, nullptr, 0, &status);
  260. if (status != U_BUFFER_OVERFLOW_ERROR || !length)
  261. return g_empty_string;
  262. StringBuffer<UChar> buffer(length);
  263. status = U_ZERO_ERROR;
  264. - udat_toPattern(date_format, TRUE, buffer.Characters(), length, &status);
  265. + udat_toPattern(date_format, true, buffer.Characters(), length, &status);
  266. if (U_FAILURE(status))
  267. return g_empty_string;
  268. return String::Adopt(buffer);
  269. diff --git a/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc b/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc
  270. index 5bea0079dd343..0e8c60a31599e 100644
  271. --- a/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc
  272. +++ b/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc
  273. @@ -312,13 +312,13 @@ static inline bool TextInChunkOrOutOfRange(UText* text,
  274. text->chunkOffset = offset <= std::numeric_limits<int32_t>::max()
  275. ? static_cast<int32_t>(offset)
  276. : 0;
  277. - is_accessible = TRUE;
  278. + is_accessible = true;
  279. return true;
  280. }
  281. if (native_index >= native_length &&
  282. text->chunkNativeLimit == native_length) {
  283. text->chunkOffset = text->chunkLength;
  284. - is_accessible = FALSE;
  285. + is_accessible = false;
  286. return true;
  287. }
  288. } else {
  289. @@ -331,12 +331,12 @@ static inline bool TextInChunkOrOutOfRange(UText* text,
  290. text->chunkOffset = offset <= std::numeric_limits<int32_t>::max()
  291. ? static_cast<int32_t>(offset)
  292. : 0;
  293. - is_accessible = TRUE;
  294. + is_accessible = true;
  295. return true;
  296. }
  297. if (native_index <= 0 && !text->chunkNativeStart) {
  298. text->chunkOffset = 0;
  299. - is_accessible = FALSE;
  300. + is_accessible = false;
  301. return true;
  302. }
  303. }
  304. @@ -347,7 +347,7 @@ static UBool TextLatin1Access(UText* text,
  305. int64_t native_index,
  306. UBool forward) {
  307. if (!text->context)
  308. - return FALSE;
  309. + return false;
  310. int64_t native_length = TextNativeLength(text);
  311. UBool is_accessible;
  312. if (TextInChunkOrOutOfRange(text, native_index, native_length, forward,
  313. @@ -371,7 +371,7 @@ static UBool TextLatin1Access(UText* text,
  314. DCHECK_EQ(new_context, kPriorContext);
  315. TextLatin1SwitchToPriorContext(text, native_index, native_length, forward);
  316. }
  317. - return TRUE;
  318. + return true;
  319. }
  320. static const struct UTextFuncs kTextLatin1Funcs = {
  321. @@ -511,7 +511,7 @@ static void TextUTF16SwitchToPriorContext(UText* text,
  322. static UBool TextUTF16Access(UText* text, int64_t native_index, UBool forward) {
  323. if (!text->context)
  324. - return FALSE;
  325. + return false;
  326. int64_t native_length = TextNativeLength(text);
  327. UBool is_accessible;
  328. if (TextInChunkOrOutOfRange(text, native_index, native_length, forward,
  329. @@ -533,7 +533,7 @@ static UBool TextUTF16Access(UText* text, int64_t native_index, UBool forward) {
  330. DCHECK_EQ(new_context, kPriorContext);
  331. TextUTF16SwitchToPriorContext(text, native_index, native_length, forward);
  332. }
  333. - return TRUE;
  334. + return true;
  335. }
  336. static const struct UTextFuncs kTextUTF16Funcs = {
  337. diff --git a/third_party/blink/renderer/platform/text/unicode_utilities.cc b/third_party/blink/renderer/platform/text/unicode_utilities.cc
  338. index 2cefd5390b6b0..b8c4515dc13ca 100644
  339. --- a/third_party/blink/renderer/platform/text/unicode_utilities.cc
  340. +++ b/third_party/blink/renderer/platform/text/unicode_utilities.cc
  341. @@ -300,7 +300,7 @@ void NormalizeCharactersIntoNFCForm(const UChar* characters,
  342. DCHECK(U_SUCCESS(status));
  343. int32_t input_length = static_cast<int32_t>(length);
  344. // copy-on-write.
  345. - icu::UnicodeString normalized(FALSE, characters, input_length);
  346. + icu::UnicodeString normalized(false, characters, input_length);
  347. // In the vast majority of cases, input is already NFC. Run a quick check
  348. // to avoid normalizing the entire input unnecessarily.
  349. int32_t normalized_prefix_length =
  350. diff --git a/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc b/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
  351. index b62573550a1cb..fb8ab0530c51e 100644
  352. --- a/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
  353. +++ b/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
  354. @@ -327,7 +327,7 @@ void TextCodecICU::CreateICUConverter() const {
  355. DLOG_IF(ERROR, err == U_AMBIGUOUS_ALIAS_WARNING)
  356. << "ICU ambiguous alias warning for encoding: " << encoding_.GetName();
  357. if (converter_icu_)
  358. - ucnv_setFallback(converter_icu_, TRUE);
  359. + ucnv_setFallback(converter_icu_, true);
  360. }
  361. int TextCodecICU::DecodeToBuffer(UChar* target,
  362. diff --git a/ui/base/l10n/formatter.cc b/ui/base/l10n/formatter.cc
  363. index e4446d4786f49..684ead8c0a0df 100644
  364. --- a/ui/base/l10n/formatter.cc
  365. +++ b/ui/base/l10n/formatter.cc
  366. @@ -234,7 +234,7 @@ void Formatter::Format(Unit unit,
  367. int value,
  368. icu::UnicodeString* formatted_string) const {
  369. DCHECK(simple_format_[unit]);
  370. - DCHECK(formatted_string->isEmpty() == TRUE);
  371. + DCHECK(formatted_string->isEmpty());
  372. UErrorCode error = U_ZERO_ERROR;
  373. FormatNumberInPlural(*simple_format_[unit],
  374. value, formatted_string, &error);
  375. @@ -250,7 +250,7 @@ void Formatter::Format(TwoUnits units,
  376. << "Detailed() not implemented for your (format, length) combination!";
  377. DCHECK(detailed_format_[units][1])
  378. << "Detailed() not implemented for your (format, length) combination!";
  379. - DCHECK(formatted_string->isEmpty() == TRUE);
  380. + DCHECK(formatted_string->isEmpty());
  381. UErrorCode error = U_ZERO_ERROR;
  382. FormatNumberInPlural(*detailed_format_[units][0], value_1,
  383. formatted_string, &error);
  384. @@ -283,7 +283,7 @@ std::unique_ptr<icu::MessageFormat> Formatter::InitFormat(
  385. base::string16 pattern = l10n_util::GetStringUTF16(pluralities.id);
  386. UErrorCode error = U_ZERO_ERROR;
  387. std::unique_ptr<icu::MessageFormat> format(new icu::MessageFormat(
  388. - icu::UnicodeString(FALSE, pattern.data(), pattern.length()), error));
  389. + icu::UnicodeString(false, pattern.data(), pattern.length()), error));
  390. DCHECK(U_SUCCESS(error));
  391. if (format.get())
  392. return format;