| OLD | NEW | 
|    1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2006-2008 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 <algorithm> |    5 #include <algorithm> | 
|    6  |    6  | 
|    7 #include "chrome/browser/history/query_parser.h" |    7 #include "chrome/browser/history/query_parser.h" | 
|    8  |    8  | 
 |    9 #include "app/l10n_util.h" | 
|    9 #include "base/logging.h" |   10 #include "base/logging.h" | 
|   10 #include "base/scoped_vector.h" |   11 #include "base/scoped_vector.h" | 
|   11 #include "base/string_util.h" |   12 #include "base/string_util.h" | 
|   12 #include "base/word_iterator.h" |   13 #include "base/word_iterator.h" | 
|   13 #include "chrome/common/l10n_util.h" |  | 
|   14 #include "unicode/uscript.h" |   14 #include "unicode/uscript.h" | 
|   15  |   15  | 
|   16 namespace { |   16 namespace { | 
|   17  |   17  | 
|   18 // Returns true if |mp1.first| is less than |mp2.first|. This is used to |   18 // Returns true if |mp1.first| is less than |mp2.first|. This is used to | 
|   19 // sort match positions. |   19 // sort match positions. | 
|   20 int CompareMatchPosition(const Snippet::MatchPosition& mp1, |   20 int CompareMatchPosition(const Snippet::MatchPosition& mp1, | 
|   21                          const Snippet::MatchPosition& mp2) { |   21                          const Snippet::MatchPosition& mp2) { | 
|   22   return mp1.first < mp2.first; |   22   return mp1.first < mp2.first; | 
|   23 } |   23 } | 
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  382     if (iter.IsWord()) { |  382     if (iter.IsWord()) { | 
|  383       std::wstring word = iter.GetWord(); |  383       std::wstring word = iter.GetWord(); | 
|  384       if (!word.empty()) { |  384       if (!word.empty()) { | 
|  385         words->push_back(QueryWord()); |  385         words->push_back(QueryWord()); | 
|  386         words->back().word = word; |  386         words->back().word = word; | 
|  387         words->back().position = iter.prev(); |  387         words->back().position = iter.prev(); | 
|  388       } |  388       } | 
|  389     } |  389     } | 
|  390   } |  390   } | 
|  391 } |  391 } | 
| OLD | NEW |