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

Side by Side Diff: chrome/browser/history/snippet.h

Issue 4247: Port some things in browser/{download,history}, minor things in common.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 // 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 CHROME_BROWSER_HISTORY_SNIPPET_H__ 8 #ifndef CHROME_BROWSER_HISTORY_SNIPPET_H__
9 #define CHROME_BROWSER_HISTORY_SNIPPET_H__ 9 #define CHROME_BROWSER_HISTORY_SNIPPET_H__
10 10
11 #include <string>
11 #include <vector> 12 #include <vector>
12 13
13 class Snippet { 14 class Snippet {
14 public: 15 public:
15 // Each pair in MatchPositions is the [begin, end) positions of a match 16 // Each pair in MatchPositions is the [begin, end) positions of a match
16 // within a string. 17 // within a string.
17 typedef std::vector<std::pair<int, int> > MatchPositions; 18 typedef std::vector<std::pair<int, int> > MatchPositions;
18 19
19 // Parses an offsets string as returned from a sqlite full text index. An 20 // Parses an offsets string as returned from a sqlite full text index. An
20 // offsets string encodes information about why a row matched a text query. 21 // offsets string encodes information about why a row matched a text query.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 private: 59 private:
59 // The text of the snippet. 60 // The text of the snippet.
60 std::wstring text_; 61 std::wstring text_;
61 62
62 // The matches within text_. 63 // The matches within text_.
63 MatchPositions matches_; 64 MatchPositions matches_;
64 }; 65 };
65 66
66 #endif // CHROME_BROWSER_HISTORY_SNIPPET_H__ 67 #endif // CHROME_BROWSER_HISTORY_SNIPPET_H__
67 68
OLDNEW
« no previous file with comments | « chrome/browser/history/in_memory_history_backend.cc ('k') | chrome/browser/history/text_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698