summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorcdn@chromium.org <cdn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 18:00:54 +0000
committercdn@chromium.org <cdn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 18:00:54 +0000
commit55954d890dd1f817ea7f49374f1de14d826b2fa4 (patch)
treedd9f64a4d64642a6d9d5c8de019dc5c778016071 /chrome
parent6df44fb660221182373b00ad27840040167205d7 (diff)
downloadchromium_src-55954d890dd1f817ea7f49374f1de14d826b2fa4.zip
chromium_src-55954d890dd1f817ea7f49374f1de14d826b2fa4.tar.gz
chromium_src-55954d890dd1f817ea7f49374f1de14d826b2fa4.tar.bz2
Commiting second word iterator patch for tsepez. this was originally reviewed at http://codereview.chromium.org/5796003/
Review URL: http://codereview.chromium.org/5707011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69278 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/autocomplete/history_quick_provider.cc6
-rw-r--r--chrome/browser/history/in_memory_url_index.cc6
-rw-r--r--chrome/browser/history/query_parser.cc10
3 files changed, 11 insertions, 11 deletions
diff --git a/chrome/browser/autocomplete/history_quick_provider.cc b/chrome/browser/autocomplete/history_quick_provider.cc
index fbd12bd..82219b2f1 100644
--- a/chrome/browser/autocomplete/history_quick_provider.cc
+++ b/chrome/browser/autocomplete/history_quick_provider.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/autocomplete/history_quick_provider.h"
#include "base/basictypes.h"
-#include "base/i18n/word_iterator.h"
+#include "base/i18n/break_iterator.h"
#include "base/string_util.h"
#include "base/logging.h"
#include "base/utf_string_conversions.h"
@@ -167,11 +167,11 @@ void HistoryQuickProvider::SetIndexForTesting(
history::InMemoryURLIndex::String16Vector
HistoryQuickProvider::WordVectorFromString16(const string16& uni_string) {
history::InMemoryURLIndex::String16Vector words;
- WordIterator iter(&uni_string, WordIterator::BREAK_WORD);
+ base::BreakIterator iter(&uni_string, base::BreakIterator::BREAK_WORD);
if (iter.Init()) {
while (iter.Advance()) {
if (iter.IsWord())
- words.push_back(iter.GetWord());
+ words.push_back(iter.GetString());
}
}
return words;
diff --git a/chrome/browser/history/in_memory_url_index.cc b/chrome/browser/history/in_memory_url_index.cc
index b3dabab9..62a22e6 100644
--- a/chrome/browser/history/in_memory_url_index.cc
+++ b/chrome/browser/history/in_memory_url_index.cc
@@ -8,7 +8,7 @@
#include <limits>
#include "app/l10n_util.h"
-#include "base/i18n/word_iterator.h"
+#include "base/i18n/break_iterator.h"
#include "base/string_util.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
@@ -234,11 +234,11 @@ InMemoryURLIndex::HistoryIDSet InMemoryURLIndex::HistoryIDsForTerm(
InMemoryURLIndex::String16Set InMemoryURLIndex::WordSetFromString16(
const string16& uni_string) {
String16Set words;
- WordIterator iter(&uni_string, WordIterator::BREAK_WORD);
+ base::BreakIterator iter(&uni_string, base::BreakIterator::BREAK_WORD);
if (iter.Init()) {
while (iter.Advance()) {
if (iter.IsWord())
- words.insert(iter.GetWord());
+ words.insert(iter.GetString());
}
}
return words;
diff --git a/chrome/browser/history/query_parser.cc b/chrome/browser/history/query_parser.cc
index e1afb86..12ecc29 100644
--- a/chrome/browser/history/query_parser.cc
+++ b/chrome/browser/history/query_parser.cc
@@ -7,7 +7,7 @@
#include <algorithm>
#include "app/l10n_util.h"
-#include "base/i18n/word_iterator.h"
+#include "base/i18n/break_iterator.h"
#include "base/logging.h"
#include "base/scoped_vector.h"
#include "base/string_util.h"
@@ -322,7 +322,7 @@ bool QueryParser::DoesQueryMatch(const string16& text,
bool QueryParser::ParseQueryImpl(const string16& query,
QueryNodeList* root) {
- WordIterator iter(&query, WordIterator::BREAK_WORD);
+ base::BreakIterator iter(&query, base::BreakIterator::BREAK_WORD);
// TODO(evanm): support a locale here
if (!iter.Init())
return false;
@@ -338,7 +338,7 @@ bool QueryParser::ParseQueryImpl(const string16& query,
// is not necessarily a word, but could also be a sequence of punctuation
// or whitespace.
if (iter.IsWord()) {
- string16 word = iter.GetWord();
+ string16 word = iter.GetString();
QueryNodeWord* word_node = new QueryNodeWord(word);
if (in_quotes)
@@ -365,7 +365,7 @@ bool QueryParser::ParseQueryImpl(const string16& query,
void QueryParser::ExtractQueryWords(const string16& text,
std::vector<QueryWord>* words) {
- WordIterator iter(&text, WordIterator::BREAK_WORD);
+ base::BreakIterator iter(&text, base::BreakIterator::BREAK_WORD);
// TODO(evanm): support a locale here
if (!iter.Init())
return;
@@ -375,7 +375,7 @@ void QueryParser::ExtractQueryWords(const string16& text,
// is not necessarily a word, but could also be a sequence of punctuation
// or whitespace.
if (iter.IsWord()) {
- string16 word = iter.GetWord();
+ string16 word = iter.GetString();
if (!word.empty()) {
words->push_back(QueryWord());
words->back().word = word;