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

Unified Diff: ui/app_list/search/tokenized_string.cc

Issue 645853013: Remove some platform specific stuff from views. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « ui/app_list/search/tokenized_string.h ('k') | ui/app_list/search/tokenized_string_char_iterator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/app_list/search/tokenized_string.h ('k') | ui/app_list/search/tokenized_string_char_iterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698