| OLD | NEW |
| 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_HISTORY_TYPES_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_ |
| 6 #define CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // 0 indicates no referrer. | 239 // 0 indicates no referrer. |
| 240 VisitID referring_visit; | 240 VisitID referring_visit; |
| 241 | 241 |
| 242 // A combination of bits from PageTransition. | 242 // A combination of bits from PageTransition. |
| 243 content::PageTransition transition; | 243 content::PageTransition transition; |
| 244 | 244 |
| 245 // The segment id (see visitsegment_database.*). | 245 // The segment id (see visitsegment_database.*). |
| 246 // If 0, the segment id is null in the table. | 246 // If 0, the segment id is null in the table. |
| 247 SegmentID segment_id; | 247 SegmentID segment_id; |
| 248 | 248 |
| 249 // True when this visit has indexed data for it. We try to keep this in sync |
| 250 // with the full text index: when we add or remove things from there, we will |
| 251 // update the visit table as well. However, that file could get deleted, or |
| 252 // out of sync in various ways, so this flag should be false when things |
| 253 // change. |
| 254 bool is_indexed; |
| 255 |
| 249 // Record how much time a user has this visit starting from the user | 256 // Record how much time a user has this visit starting from the user |
| 250 // opened this visit to the user closed or ended this visit. | 257 // opened this visit to the user closed or ended this visit. |
| 251 // This includes both active and inactive time as long as | 258 // This includes both active and inactive time as long as |
| 252 // the visit was present. | 259 // the visit was present. |
| 253 base::TimeDelta visit_duration; | 260 base::TimeDelta visit_duration; |
| 254 | 261 |
| 255 // Compares two visits based on dates, for sorting. | 262 // Compares two visits based on dates, for sorting. |
| 256 bool operator<(const VisitRow& other) { | 263 bool operator<(const VisitRow& other) { |
| 257 return visit_time < other.visit_time; | 264 return visit_time < other.visit_time; |
| 258 } | 265 } |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 base::Time end_time; | 453 base::Time end_time; |
| 447 | 454 |
| 448 // Sets the query time to the last |days_ago| days to the present time. | 455 // Sets the query time to the last |days_ago| days to the present time. |
| 449 void SetRecentDayRange(int days_ago); | 456 void SetRecentDayRange(int days_ago); |
| 450 | 457 |
| 451 // The maximum number of results to return. The results will be sorted with | 458 // The maximum number of results to return. The results will be sorted with |
| 452 // the most recent first, so older results may not be returned if there is not | 459 // the most recent first, so older results may not be returned if there is not |
| 453 // enough room. When 0, this will return everything (the default). | 460 // enough room. When 0, this will return everything (the default). |
| 454 int max_count; | 461 int max_count; |
| 455 | 462 |
| 463 // Only search within the page body if true, otherwise search all columns |
| 464 // including url and time. Defaults to false. |
| 465 bool body_only; |
| 466 |
| 456 enum DuplicateHandling { | 467 enum DuplicateHandling { |
| 457 // Omit visits for which there is a more recent visit to the same URL. | 468 // Omit visits for which there is a more recent visit to the same URL. |
| 458 // Each URL in the results will appear only once. | 469 // Each URL in the results will appear only once. |
| 459 REMOVE_ALL_DUPLICATES, | 470 REMOVE_ALL_DUPLICATES, |
| 460 | 471 |
| 461 // Omit visits for which there is a more recent visit to the same URL on | 472 // Omit visits for which there is a more recent visit to the same URL on |
| 462 // the same day. Each URL will appear no more than once per day, where the | 473 // the same day. Each URL will appear no more than once per day, where the |
| 463 // day is defined by the local timezone. | 474 // day is defined by the local timezone. |
| 464 REMOVE_DUPLICATES_PER_DAY, | 475 REMOVE_DUPLICATES_PER_DAY, |
| 465 | 476 |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 void SetTimeRangeForOneDay(base::Time time); | 753 void SetTimeRangeForOneDay(base::Time time); |
| 743 | 754 |
| 744 std::set<GURL> urls; | 755 std::set<GURL> urls; |
| 745 base::Time begin_time; | 756 base::Time begin_time; |
| 746 base::Time end_time; | 757 base::Time end_time; |
| 747 }; | 758 }; |
| 748 | 759 |
| 749 } // namespace history | 760 } // namespace history |
| 750 | 761 |
| 751 #endif // CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_ | 762 #endif // CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_ |
| OLD | NEW |