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

Side by Side Diff: components/history/core/browser/visit_database.h

Issue 1081923002: Remove PrerenderLocalPredictor, part 5. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prerender-local-predictor-4
Patch Set: Created 5 years, 8 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 COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DATABASE_H_ 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DATABASE_H_
6 #define COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DATABASE_H_ 6 #define COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DATABASE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "components/history/core/browser/history_types.h" 10 #include "components/history/core/browser/history_types.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 int* count, 178 int* count,
179 base::Time* first_visit); 179 base::Time* first_visit);
180 180
181 // Get the time of the first item in our database. 181 // Get the time of the first item in our database.
182 bool GetStartDate(base::Time* first_visit); 182 bool GetStartDate(base::Time* first_visit);
183 183
184 // Get the source information about the given visits. 184 // Get the source information about the given visits.
185 void GetVisitsSource(const VisitVector& visits, 185 void GetVisitsSource(const VisitVector& visits,
186 VisitSourceMap* sources); 186 VisitSourceMap* sources);
187 187
188 // Obtains BriefVisitInfo for the specified number of most recent visits
189 // from the visit database.
190 void GetBriefVisitInfoOfMostRecentVisits(
191 int max_visits,
192 std::vector<BriefVisitInfo>* result_vector);
193
194 protected: 188 protected:
195 // Returns the database for the functions in this interface. 189 // Returns the database for the functions in this interface.
196 virtual sql::Connection& GetDB() = 0; 190 virtual sql::Connection& GetDB() = 0;
197 191
198 // Called by the derived classes on initialization to make sure the tables 192 // Called by the derived classes on initialization to make sure the tables
199 // and indices are properly set up. Must be called before anything else. 193 // and indices are properly set up. Must be called before anything else.
200 bool InitVisitTable(); 194 bool InitVisitTable();
201 195
202 // Convenience to fill a VisitRow. Assumes the visit values are bound starting 196 // Convenience to fill a VisitRow. Assumes the visit values are bound starting
203 // at index 0. 197 // at index 0.
(...skipping 20 matching lines...) Expand all
224 DISALLOW_COPY_AND_ASSIGN(VisitDatabase); 218 DISALLOW_COPY_AND_ASSIGN(VisitDatabase);
225 }; 219 };
226 220
227 // Rows, in order, of the visit table. 221 // Rows, in order, of the visit table.
228 #define HISTORY_VISIT_ROW_FIELDS \ 222 #define HISTORY_VISIT_ROW_FIELDS \
229 " id,url,visit_time,from_visit,transition,segment_id,visit_duration " 223 " id,url,visit_time,from_visit,transition,segment_id,visit_duration "
230 224
231 } // namespace history 225 } // namespace history
232 226
233 #endif // COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DATABASE_H_ 227 #endif // COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DATABASE_H_
OLDNEW
« no previous file with comments | « components/history/core/browser/history_types.h ('k') | components/history/core/browser/visit_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698