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

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

Issue 16951015: Remove TextDatabase from the history service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replace_fts
Patch Set: Sync and rebase. Created 7 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_VISIT_DATABASE_H_ 5 #ifndef CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_
6 #define CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_ 6 #define CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "chrome/browser/history/history_types.h" 10 #include "chrome/browser/history/history_types.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // Updates an existing row. The new information is set on the row, using the 52 // Updates an existing row. The new information is set on the row, using the
53 // VisitID as the key. The visit must exist. Returns true on success. 53 // VisitID as the key. The visit must exist. Returns true on success.
54 bool UpdateVisitRow(const VisitRow& visit); 54 bool UpdateVisitRow(const VisitRow& visit);
55 55
56 // Fills in the given vector with all of the visits for the given page ID, 56 // Fills in the given vector with all of the visits for the given page ID,
57 // sorted in ascending order of date. Returns true on success (although there 57 // sorted in ascending order of date. Returns true on success (although there
58 // may still be no matches). 58 // may still be no matches).
59 bool GetVisitsForURL(URLID url_id, VisitVector* visits); 59 bool GetVisitsForURL(URLID url_id, VisitVector* visits);
60 60
61 // Fills in the given vector with all of the visits for the given page ID that
62 // have the |is_indexed| field set to true, in no particular order.
63 // Returns true on success (although there may still be no matches).
64 bool GetIndexedVisitsForURL(URLID url_id, VisitVector* visits);
65
66 // Fills in the given vector with the visits for the given page ID which 61 // Fills in the given vector with the visits for the given page ID which
67 // match the set of options passed, sorted in ascending order of date. 62 // match the set of options passed, sorted in ascending order of date.
68 // 63 //
69 // Returns true if there are more results available, i.e. if the number of 64 // Returns true if there are more results available, i.e. if the number of
70 // results was restricted by |options.max_count|. 65 // results was restricted by |options.max_count|.
71 bool GetVisitsForURLWithOptions(URLID url_id, 66 bool GetVisitsForURLWithOptions(URLID url_id,
72 const QueryOptions& options, 67 const QueryOptions& options,
73 VisitVector* visits); 68 VisitVector* visits);
74 69
75 // Fills the vector with all visits with times in the given list. 70 // Fills the vector with all visits with times in the given list.
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 // don't have visit_duration column yet. 218 // don't have visit_duration column yet.
224 bool MigrateVisitsWithoutDuration(); 219 bool MigrateVisitsWithoutDuration();
225 220
226 private: 221 private:
227 222
228 DISALLOW_COPY_AND_ASSIGN(VisitDatabase); 223 DISALLOW_COPY_AND_ASSIGN(VisitDatabase);
229 }; 224 };
230 225
231 // Rows, in order, of the visit table. 226 // Rows, in order, of the visit table.
232 #define HISTORY_VISIT_ROW_FIELDS \ 227 #define HISTORY_VISIT_ROW_FIELDS \
233 " id,url,visit_time,from_visit,transition,segment_id,is_indexed," \ 228 " id,url,visit_time,from_visit,transition,segment_id,visit_duration "
234 "visit_duration "
235 229
236 } // namespace history 230 } // namespace history
237 231
238 #endif // CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_ 232 #endif // CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/text_database_manager_unittest.cc ('k') | chrome/browser/history/visit_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698