| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This module computes snippets of queries based on hits in the documents | 5 // This module computes snippets of queries based on hits in the documents |
| 6 // for display in history search results. | 6 // for display in history search results. |
| 7 | 7 |
| 8 #ifndef COMPONENTS_QUERY_PARSER_SNIPPET_H__ | 8 #ifndef COMPONENTS_QUERY_PARSER_SNIPPET_H__ |
| 9 #define COMPONENTS_QUERY_PARSER_SNIPPET_H__ | 9 #define COMPONENTS_QUERY_PARSER_SNIPPET_H__ |
| 10 | 10 |
| 11 #include <stddef.h> |
| 12 |
| 11 #include <vector> | 13 #include <vector> |
| 12 | 14 |
| 13 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
| 14 | 16 |
| 15 namespace query_parser { | 17 namespace query_parser { |
| 16 | 18 |
| 17 class Snippet { | 19 class Snippet { |
| 18 public: | 20 public: |
| 19 // Each MatchPosition is the [begin, end) positions of a match within a | 21 // Each MatchPosition is the [begin, end) positions of a match within a |
| 20 // string. | 22 // string. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // The text of the snippet. | 66 // The text of the snippet. |
| 65 base::string16 text_; | 67 base::string16 text_; |
| 66 | 68 |
| 67 // The matches within text_. | 69 // The matches within text_. |
| 68 MatchPositions matches_; | 70 MatchPositions matches_; |
| 69 }; | 71 }; |
| 70 | 72 |
| 71 } // namespace query_parser | 73 } // namespace query_parser |
| 72 | 74 |
| 73 #endif // COMPONENTS_QUERY_PARSER_SNIPPET_H__ | 75 #endif // COMPONENTS_QUERY_PARSER_SNIPPET_H__ |
| OLD | NEW |