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

Unified Diff: components/spellcheck/renderer/spellcheck_worditerator.cc

Issue 2282403003: Fix build with system ICU (Closed)
Patch Set: Created 4 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 | « build/linux/unbundle/replace_gn_files.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/spellcheck/renderer/spellcheck_worditerator.cc
diff --git a/components/spellcheck/renderer/spellcheck_worditerator.cc b/components/spellcheck/renderer/spellcheck_worditerator.cc
index 8ed1c87f7bf81c7bc1b8dcbd8b561cd9cbf33081..84b64e788e13d8343806903dacee1d28d2759295 100644
--- a/components/spellcheck/renderer/spellcheck_worditerator.cc
+++ b/components/spellcheck/renderer/spellcheck_worditerator.cc
@@ -22,8 +22,6 @@
#include "third_party/icu/source/common/unicode/uscript.h"
#include "third_party/icu/source/i18n/unicode/ulocdata.h"
-using base::i18n::BreakIterator;
-
// SpellcheckCharAttribute implementation:
SpellcheckCharAttribute::SpellcheckCharAttribute()
@@ -332,8 +330,8 @@ bool SpellcheckWordIterator::Initialize(
if (rule.empty())
return false;
- std::unique_ptr<BreakIterator> iterator(
- new BreakIterator(base::string16(), rule));
+ std::unique_ptr<base::i18n::BreakIterator> iterator(
groby-ooo-7-16 2016/08/29 17:37:12 Tiny nit: While you're here, would you mind switch
Paweł Hajdan Jr. 2016/08/30 08:29:17 Done.
+ new base::i18n::BreakIterator(base::string16(), rule));
if (!iterator->Init()) {
// Since we're not passing in any text, the only reason this could fail
// is if we fail to parse the rules. Since the rules are hardcoded,
@@ -388,7 +386,7 @@ SpellcheckWordIterator::WordIteratorStatus SpellcheckWordIterator::GetNextWord(
const size_t start = iterator_->prev();
const size_t length = iterator_->pos() - start;
switch (iterator_->GetWordBreakStatus()) {
- case BreakIterator::IS_WORD_BREAK: {
+ case base::i18n::BreakIterator::IS_WORD_BREAK: {
if (Normalize(start, length, word_string)) {
*word_start = start;
*word_length = length;
@@ -396,7 +394,7 @@ SpellcheckWordIterator::WordIteratorStatus SpellcheckWordIterator::GetNextWord(
}
break;
}
- case BreakIterator::IS_SKIPPABLE_WORD: {
+ case base::i18n::BreakIterator::IS_SKIPPABLE_WORD: {
*word_string = iterator_->GetString();
*word_start = start;
*word_length = length;
@@ -404,7 +402,7 @@ SpellcheckWordIterator::WordIteratorStatus SpellcheckWordIterator::GetNextWord(
}
// |iterator_| is RULE_BASED so the break status should never be
// IS_LINE_OR_CHAR_BREAK.
- case BreakIterator::IS_LINE_OR_CHAR_BREAK: {
+ case base::i18n::BreakIterator::IS_LINE_OR_CHAR_BREAK: {
NOTREACHED();
break;
}
« no previous file with comments | « build/linux/unbundle/replace_gn_files.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698