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

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

Issue 10060003: Support for different weight-functions for time-slicing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added missing #include Created 8 years, 7 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 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/history/history_types.h" 9 #include "chrome/browser/history/history_types.h"
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 // Fills all visits in the given time range into the given vector that should 92 // Fills all visits in the given time range into the given vector that should
93 // be user-visible, which excludes things like redirects and subframes. The 93 // be user-visible, which excludes things like redirects and subframes. The
94 // begin time is inclusive, the end time is exclusive. Either time can be 94 // begin time is inclusive, the end time is exclusive. Either time can be
95 // is_null(), in which case the times in that direction are unbounded. 95 // is_null(), in which case the times in that direction are unbounded.
96 // 96 //
97 // Up to |max_count| visits will be returned. If there are more visits than 97 // Up to |max_count| visits will be returned. If there are more visits than
98 // that, the most recent |max_count| will be returned. If 0, all visits in the 98 // that, the most recent |max_count| will be returned. If 0, all visits in the
99 // range will be computed. 99 // range will be computed.
100 // 100 //
101 // Only one visit for each URL will be returned, and it will be the most 101 // If |unique| is set, only one visit for each URL will be returned, and it
102 // recent one in the time range. 102 // will be the most recent one in the time range.
103 void GetVisibleVisitsInRange(base::Time begin_time, base::Time end_time, 103 void GetVisibleVisitsInRange(base::Time begin_time, base::Time end_time,
104 int max_count, 104 int max_count,
105 VisitVector* visits); 105 VisitVector* visits,
106 bool unique);
106 107
107 // Fills all visits in the given time ranges into the given vector that should 108 // Fills all visits in the given time ranges into the given vector that should
108 // be user-visible, which excludes things like redirects and subframes. The 109 // be user-visible, which excludes things like redirects and subframes. The
109 // begin time is inclusive, the end time is exclusive. 110 // begin time is inclusive, the end time is exclusive.
110 // 111 //
111 // Up to |max_count| visits will be returned. If there are more visits than 112 // Up to |max_count| visits will be returned. If there are more visits than
112 // that, the most recent |max_count| will be returned. If 0, all visits in the 113 // that, the most recent |max_count| will be returned. If 0, all visits in the
113 // range will be computed. 114 // range will be computed.
114 //
115 // Only one visit for each URL will be returned, and it will be the most
116 // recent one in the time range.
117 void GetVisibleVisitsDuringTimes(const VisitFilter& time_filter, 115 void GetVisibleVisitsDuringTimes(const VisitFilter& time_filter,
118 int max_count, 116 int max_count,
119 VisitVector* visits); 117 VisitVector* visits);
120 118
121 // Returns the visit ID for the most recent visit of the given URL ID, or 0 119 // Returns the visit ID for the most recent visit of the given URL ID, or 0
122 // if there is no visit for the URL. 120 // if there is no visit for the URL.
123 // 121 //
124 // If non-NULL, the given visit row will be filled with the information of 122 // If non-NULL, the given visit row will be filled with the information of
125 // the found visit. When no visit is found, the row will be unchanged. 123 // the found visit. When no visit is found, the row will be unchanged.
126 VisitID GetMostRecentVisitForURL(URLID url_id, 124 VisitID GetMostRecentVisitForURL(URLID url_id,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 bool MigrateVisitsWithoutDuration(); 197 bool MigrateVisitsWithoutDuration();
200 198
201 private: 199 private:
202 200
203 DISALLOW_COPY_AND_ASSIGN(VisitDatabase); 201 DISALLOW_COPY_AND_ASSIGN(VisitDatabase);
204 }; 202 };
205 203
206 } // history 204 } // history
207 205
208 #endif // CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_ 206 #endif // CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/history_backend_unittest.cc ('k') | chrome/browser/history/visit_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698