| 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_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 "chrome/browser/history/history_types.h" | 8 #include "chrome/browser/history/history_types.h" |
| 9 | 9 |
| 10 namespace sql { | 10 namespace sql { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 82 |
| 83 // Fills all visits in the given time range into the given vector that should | 83 // Fills all visits in the given time range into the given vector that should |
| 84 // be user-visible, which excludes things like redirects and subframes. The | 84 // be user-visible, which excludes things like redirects and subframes. The |
| 85 // begin time is inclusive, the end time is exclusive. Either time can be | 85 // begin time is inclusive, the end time is exclusive. Either time can be |
| 86 // is_null(), in which case the times in that direction are unbounded. | 86 // is_null(), in which case the times in that direction are unbounded. |
| 87 // | 87 // |
| 88 // Up to |max_count| visits will be returned. If there are more visits than | 88 // Up to |max_count| visits will be returned. If there are more visits than |
| 89 // that, the most recent |max_count| will be returned. If 0, all visits in the | 89 // that, the most recent |max_count| will be returned. If 0, all visits in the |
| 90 // range will be computed. | 90 // range will be computed. |
| 91 // | 91 // |
| 92 // When |most_recent_visit_only| is set, only one visit for each URL will be | 92 // Only one visit for each URL will be returned, and it will be the most |
| 93 // returned, and it will be the most recent one in the time range. | 93 // recent one in the time range. |
| 94 void GetVisibleVisitsInRange(base::Time begin_time, base::Time end_time, | 94 void GetVisibleVisitsInRange(base::Time begin_time, base::Time end_time, |
| 95 bool most_recent_visit_only, | |
| 96 int max_count, | 95 int max_count, |
| 97 VisitVector* visits); | 96 VisitVector* visits); |
| 98 | 97 |
| 99 // Returns the visit ID for the most recent visit of the given URL ID, or 0 | 98 // Returns the visit ID for the most recent visit of the given URL ID, or 0 |
| 100 // if there is no visit for the URL. | 99 // if there is no visit for the URL. |
| 101 // | 100 // |
| 102 // If non-NULL, the given visit row will be filled with the information of | 101 // If non-NULL, the given visit row will be filled with the information of |
| 103 // the found visit. When no visit is found, the row will be unchanged. | 102 // the found visit. When no visit is found, the row will be unchanged. |
| 104 VisitID GetMostRecentVisitForURL(URLID url_id, | 103 VisitID GetMostRecentVisitForURL(URLID url_id, |
| 105 VisitRow* visit_row); | 104 VisitRow* visit_row); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // hasn't happened yet. | 159 // hasn't happened yet. |
| 161 static void FillVisitVector(sql::Statement& statement, VisitVector* visits); | 160 static void FillVisitVector(sql::Statement& statement, VisitVector* visits); |
| 162 | 161 |
| 163 private: | 162 private: |
| 164 DISALLOW_COPY_AND_ASSIGN(VisitDatabase); | 163 DISALLOW_COPY_AND_ASSIGN(VisitDatabase); |
| 165 }; | 164 }; |
| 166 | 165 |
| 167 } // history | 166 } // history |
| 168 | 167 |
| 169 #endif // CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_ | 168 #endif // CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_ |
| OLD | NEW |