| Index: ui/app_list/search/tokenized_string.cc
|
| diff --git a/ui/app_list/search/tokenized_string.cc b/ui/app_list/search/tokenized_string.cc
|
| deleted file mode 100644
|
| index 5348f77cc54fe54ef3623cf82fac840068c6bd89..0000000000000000000000000000000000000000
|
| --- a/ui/app_list/search/tokenized_string.cc
|
| +++ /dev/null
|
| @@ -1,46 +0,0 @@
|
| -// Copyright 2013 The Chromium Authors. All rights reserved.
|
| -// Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.
|
| -
|
| -#include "ui/app_list/search/tokenized_string.h"
|
| -
|
| -#include "base/i18n/break_iterator.h"
|
| -#include "base/i18n/case_conversion.h"
|
| -#include "base/logging.h"
|
| -#include "ui/app_list/search/term_break_iterator.h"
|
| -
|
| -using base::i18n::BreakIterator;
|
| -
|
| -namespace app_list {
|
| -
|
| -TokenizedString::TokenizedString(const base::string16& text)
|
| - : text_(text) {
|
| - Tokenize();
|
| -}
|
| -
|
| -TokenizedString::~TokenizedString() {}
|
| -
|
| -void TokenizedString::Tokenize() {
|
| - BreakIterator break_iter(text_, BreakIterator::BREAK_WORD);
|
| - if (!break_iter.Init()) {
|
| - NOTREACHED() << "BreakIterator init failed"
|
| - << ", text=\"" << text_ << "\"";
|
| - return;
|
| - }
|
| -
|
| - while (break_iter.Advance()) {
|
| - if (!break_iter.IsWord())
|
| - continue;
|
| -
|
| - const base::string16 word(break_iter.GetString());
|
| - const size_t word_start = break_iter.prev();
|
| - TermBreakIterator term_iter(word);
|
| - while (term_iter.Advance()) {
|
| - tokens_.push_back(base::i18n::ToLower(term_iter.GetCurrentTerm()));
|
| - mappings_.push_back(gfx::Range(word_start + term_iter.prev(),
|
| - word_start + term_iter.pos()));
|
| - }
|
| - }
|
| -}
|
| -
|
| -} // namespace app_list
|
|
|