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

Unified Diff: chrome/renderer/spellchecker/spellcheck_worditerator.h

Issue 270203003: Refactor code to avoid direct dependency upon ICU: spellcheck_worditerator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactoring_icu_usage
Patch Set: Simplify Created 6 years, 7 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
Index: chrome/renderer/spellchecker/spellcheck_worditerator.h
diff --git a/chrome/renderer/spellchecker/spellcheck_worditerator.h b/chrome/renderer/spellchecker/spellcheck_worditerator.h
index 09d54a69159f6ded7354c8c154dbd13a6e6a053f..78d69b5e0e726cccb16c65a54c2211dfb3b08e9a 100644
--- a/chrome/renderer/spellchecker/spellcheck_worditerator.h
+++ b/chrome/renderer/spellchecker/spellcheck_worditerator.h
@@ -12,8 +12,9 @@
#include <string>
#include "base/basictypes.h"
+#include "base/i18n/break_iterator.h"
groby-ooo-7-16 2014/05/08 17:52:00 If you forward declare BreakIterator, you don't ne
Andrew Hayden (chromium.org) 2014/05/09 15:16:16 Done.
+#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
-#include "third_party/icu/source/common/unicode/ubrk.h"
#include "third_party/icu/source/common/unicode/uscript.h"
// A class which encapsulates language-specific operations used by
@@ -156,18 +157,12 @@ class SpellcheckWordIterator {
// The pointer to the input string from which we are extracting words.
const base::char16* text_;
- // The length of the original string.
- int length_;
-
- // The current position in the original string.
- int position_;
-
// The language-specific attributes used for filtering out non-word
// characters.
const SpellcheckCharAttribute* attribute_;
- // The ICU break iterator.
- UBreakIterator* iterator_;
+ // The break iterator.
+ scoped_ptr<base::i18n::BreakIterator> iterator_;
DISALLOW_COPY_AND_ASSIGN(SpellcheckWordIterator);
};

Powered by Google App Engine
This is Rietveld 408576698