OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_BACKEND_H__ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H__ |
6 #define CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H__ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H__ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/gfx/rect.h" | 10 #include "base/gfx/rect.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 const GURL& url, | 137 const GURL& url, |
138 bool want_visits); | 138 bool want_visits); |
139 void QueryHistory(scoped_refptr<QueryHistoryRequest> request, | 139 void QueryHistory(scoped_refptr<QueryHistoryRequest> request, |
140 const std::wstring& text_query, | 140 const std::wstring& text_query, |
141 const QueryOptions& options); | 141 const QueryOptions& options); |
142 void QueryRedirectsFrom(scoped_refptr<QueryRedirectsRequest> request, | 142 void QueryRedirectsFrom(scoped_refptr<QueryRedirectsRequest> request, |
143 const GURL& url); | 143 const GURL& url); |
144 | 144 |
145 void GetVisitCountToHost(scoped_refptr<GetVisitCountToHostRequest> request, | 145 void GetVisitCountToHost(scoped_refptr<GetVisitCountToHostRequest> request, |
146 const GURL& url); | 146 const GURL& url); |
147 | |
148 // Computes the most recent URL(s) that the given canonical URL has | 147 // Computes the most recent URL(s) that the given canonical URL has |
149 // redirected to and returns true on success. There may be more than one | 148 // redirected to and returns true on success. There may be more than one |
150 // redirect in a row, so this function will fill the given array with the | 149 // redirect in a row, so this function will fill the given array with the |
151 // entire chain. If there are no redirects for the most recent visit of the | 150 // entire chain. If there are no redirects for the most recent visit of the |
152 // URL, or the URL is not in history, returns false. | 151 // URL, or the URL is not in history, returns false. |
153 // | 152 // |
154 // Backend for QueryRedirectsFrom. | 153 // Backend for QueryRedirectsFrom. |
155 bool GetMostRecentRedirectsFrom(const GURL& url, | 154 bool GetMostRecentRedirectsFrom(const GURL& url, |
156 HistoryService::RedirectList* redirects); | 155 HistoryService::RedirectList* redirects); |
157 | 156 |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 // to the database by using the last_recorded_time_ (q.v.). We still can't | 453 // to the database by using the last_recorded_time_ (q.v.). We still can't |
455 // enforce or guarantee uniqueness, since the user might set his clock back. | 454 // enforce or guarantee uniqueness, since the user might set his clock back. |
456 base::Time last_requested_time_; | 455 base::Time last_requested_time_; |
457 | 456 |
458 // Timestamp of the last page addition, as it was recorded in the database. | 457 // Timestamp of the last page addition, as it was recorded in the database. |
459 // If two or more requests come in at the same time, we increment that time | 458 // If two or more requests come in at the same time, we increment that time |
460 // by 1 us between them so it's more likely to be unique in the database. | 459 // by 1 us between them so it's more likely to be unique in the database. |
461 // This keeps track of that higher-resolution timestamp. | 460 // This keeps track of that higher-resolution timestamp. |
462 base::Time last_recorded_time_; | 461 base::Time last_recorded_time_; |
463 | 462 |
| 463 // Timestamp of the first entry in our database. |
| 464 base::Time first_recorded_time_; |
| 465 |
464 // When non-NULL, this is the task that should be invoked on | 466 // When non-NULL, this is the task that should be invoked on |
465 MessageLoop* backend_destroy_message_loop_; | 467 MessageLoop* backend_destroy_message_loop_; |
466 Task* backend_destroy_task_; | 468 Task* backend_destroy_task_; |
467 | 469 |
468 // Tracks page transition types. | 470 // Tracks page transition types. |
469 VisitTracker tracker_; | 471 VisitTracker tracker_; |
470 | 472 |
471 // A boolean variable to track whether we have already purged obsolete segment | 473 // A boolean variable to track whether we have already purged obsolete segment |
472 // data. | 474 // data. |
473 bool segment_queried_; | 475 bool segment_queried_; |
(...skipping 12 matching lines...) Expand all Loading... |
486 // Publishes the history to all indexers which are registered to receive | 488 // Publishes the history to all indexers which are registered to receive |
487 // history data from us. Can be NULL if there are no listeners. | 489 // history data from us. Can be NULL if there are no listeners. |
488 scoped_ptr<HistoryPublisher> history_publisher_; | 490 scoped_ptr<HistoryPublisher> history_publisher_; |
489 | 491 |
490 DISALLOW_EVIL_CONSTRUCTORS(HistoryBackend); | 492 DISALLOW_EVIL_CONSTRUCTORS(HistoryBackend); |
491 }; | 493 }; |
492 | 494 |
493 } // namespace history | 495 } // namespace history |
494 | 496 |
495 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H__ | 497 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H__ |
OLD | NEW |