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

Side by Side Diff: chrome/browser/history/query_parser.cc

Issue 7342047: Cleanup base/stl_util (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed unneeded include + rebase Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/history/query_parser.h" 5 #include "chrome/browser/history/query_parser.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/i18n/break_iterator.h" 10 #include "base/i18n/break_iterator.h"
11 #include "base/i18n/case_conversion.h" 11 #include "base/i18n/case_conversion.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/stl_util-inl.h" 13 #include "base/stl_util.h"
14 14
15 namespace { 15 namespace {
16 16
17 // Returns true if |mp1.first| is less than |mp2.first|. This is used to 17 // Returns true if |mp1.first| is less than |mp2.first|. This is used to
18 // sort match positions. 18 // sort match positions.
19 int CompareMatchPosition(const Snippet::MatchPosition& mp1, 19 int CompareMatchPosition(const Snippet::MatchPosition& mp1,
20 const Snippet::MatchPosition& mp2) { 20 const Snippet::MatchPosition& mp2) {
21 return mp1.first < mp2.first; 21 return mp1.first < mp2.first;
22 } 22 }
23 23
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 if (iter.IsWord()) { 407 if (iter.IsWord()) {
408 string16 word = iter.GetString(); 408 string16 word = iter.GetString();
409 if (!word.empty()) { 409 if (!word.empty()) {
410 words->push_back(QueryWord()); 410 words->push_back(QueryWord());
411 words->back().word = word; 411 words->back().word = word;
412 words->back().position = iter.prev(); 412 words->back().position = iter.prev();
413 } 413 }
414 } 414 }
415 } 415 }
416 } 416 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698