| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_HISTORY_TEXT_DATABASE_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_TEXT_DATABASE_H_ |
| 6 #define CHROME_BROWSER_HISTORY_TEXT_DATABASE_H_ | 6 #define CHROME_BROWSER_HISTORY_TEXT_DATABASE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 void Optimize(); | 114 void Optimize(); |
| 115 | 115 |
| 116 // Querying ------------------------------------------------------------------ | 116 // Querying ------------------------------------------------------------------ |
| 117 | 117 |
| 118 // Executes the given query. See QueryOptions for more info on input. | 118 // Executes the given query. See QueryOptions for more info on input. |
| 119 // | 119 // |
| 120 // The results are appended to any existing ones in |*results|, and the first | 120 // The results are appended to any existing ones in |*results|, and the first |
| 121 // time considered for the output is in |first_time_searched| | 121 // time considered for the output is in |first_time_searched| |
| 122 // (see QueryResults for more). | 122 // (see QueryResults for more). |
| 123 // | 123 // |
| 124 // When |options.most_recent_visit_only|, any URLs found will be added to | 124 // Any URLs found will be added to |unique_urls|. If a URL is already in the |
| 125 // |unique_urls|. If a URL is already in the set, additional results will not | 125 // set, additional results will not be added (giving the ability to uniquify |
| 126 // be added (giving the ability to uniquify URL results, with the most recent | 126 // URL results). |
| 127 // If |most_recent_visit_only| is not set, |unique_urls| will be untouched. | |
| 128 // | 127 // |
| 129 // Callers must run QueryParser on the user text and pass the results of the | 128 // Callers must run QueryParser on the user text and pass the results of the |
| 130 // QueryParser to this method as the query string. | 129 // QueryParser to this method as the query string. |
| 131 void GetTextMatches(const std::string& query, | 130 void GetTextMatches(const std::string& query, |
| 132 const QueryOptions& options, | 131 const QueryOptions& options, |
| 133 std::vector<Match>* results, | 132 std::vector<Match>* results, |
| 134 URLSet* unique_urls, | 133 URLSet* unique_urls, |
| 135 base::Time* first_time_searched); | 134 base::Time* first_time_searched); |
| 136 | 135 |
| 137 // Converts the given database identifier to a filename. This does not include | 136 // Converts the given database identifier to a filename. This does not include |
| (...skipping 15 matching lines...) Expand all Loading... |
| 153 FilePath file_name_; | 152 FilePath file_name_; |
| 154 | 153 |
| 155 sql::MetaTable meta_table_; | 154 sql::MetaTable meta_table_; |
| 156 | 155 |
| 157 DISALLOW_COPY_AND_ASSIGN(TextDatabase); | 156 DISALLOW_COPY_AND_ASSIGN(TextDatabase); |
| 158 }; | 157 }; |
| 159 | 158 |
| 160 } // namespace history | 159 } // namespace history |
| 161 | 160 |
| 162 #endif // CHROME_BROWSER_HISTORY_TEXT_DATABASE_H_ | 161 #endif // CHROME_BROWSER_HISTORY_TEXT_DATABASE_H_ |
| OLD | NEW |