| Index: chrome/browser/history/in_memory_url_index_types.h
|
| diff --git a/chrome/browser/history/in_memory_url_index_types.h b/chrome/browser/history/in_memory_url_index_types.h
|
| index d8a024347e0253e29328c4e6e1b2e230a69f18d3..d70f6c5f4fb68e0757b03cd68d29e0b518bb3e61 100644
|
| --- a/chrome/browser/history/in_memory_url_index_types.h
|
| +++ b/chrome/browser/history/in_memory_url_index_types.h
|
| @@ -10,6 +10,7 @@
|
| #include <vector>
|
|
|
| #include "base/strings/string16.h"
|
| +#include "base/strings/utf_offset_string_conversions.h"
|
| #include "chrome/browser/autocomplete/history_provider_util.h"
|
| #include "chrome/browser/history/history_types.h"
|
| #include "url/gurl.h"
|
| @@ -54,11 +55,16 @@ TermMatches MatchTermInString(const base::string16& term,
|
| // returns the cleaned up matches.
|
| TermMatches SortAndDeoverlapMatches(const TermMatches& matches);
|
|
|
| -// Extracts and returns the offsets from |matches|.
|
| +// Extracts and returns the offsets from |matches|. This includes both
|
| +// the offsets corresponding to the beginning of a match and the offsets
|
| +// corresponding to the end of a match (i.e., offset+length for that match).
|
| std::vector<size_t> OffsetsFromTermMatches(const TermMatches& matches);
|
|
|
| -// Replaces the offsets in |matches| with those given in |offsets|, deleting
|
| -// any which are npos, and returns the updated list of matches.
|
| +// Replaces the offsets and lengths in |matches| with those given in |offsets|.
|
| +// |offsets| gives beginning and ending offsets for each match; this function
|
| +// translates (beginning, ending) offset into (beginning offset, length of
|
| +// match). It deletes any matches for which an endpoint is npos and returns
|
| +// the updated list of matches.
|
| TermMatches ReplaceOffsetsInTermMatches(const TermMatches& matches,
|
| const std::vector<size_t>& offsets);
|
|
|
|
|