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

Unified Diff: base/i18n/break_iterator.h

Issue 266883010: Refactor code to avoid direct dependency upon ICU: phishing_term_feature_extractor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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: base/i18n/break_iterator.h
diff --git a/base/i18n/break_iterator.h b/base/i18n/break_iterator.h
index 618a320924e4993e4d76ee818462c6512b8bcc37..83f85571609ba70fda9963c71abdf67cdd7223ee 100644
--- a/base/i18n/break_iterator.h
+++ b/base/i18n/break_iterator.h
@@ -106,6 +106,11 @@ class BASE_I18N_EXPORT BreakIterator {
// or BreakIterator::npos when done.
size_t pos() const { return pos_; }
+ // Returns whether or not the iterator is currently at a valid position.
+ bool IsValid() const {
+ return pos_ != static_cast<size_t>(-1);
+ }
mattm 2014/05/09 23:07:12 This change is no longer needed
Andrew Hayden (chromium.org) 2014/05/12 13:07:37 Done.
+
private:
// ICU iterator, avoiding ICU ubrk.h dependence.
// This is actually an ICU UBreakiterator* type, which turns out to be

Powered by Google App Engine
This is Rietveld 408576698