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 #include "chrome/browser/history/expire_history_backend.h" | 5 #include "chrome/browser/history/expire_history_backend.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "chrome/browser/bookmarks/bookmark_service.h" | 11 #include "chrome/browser/bookmarks/bookmark_service.h" |
12 #include "chrome/browser/history/archived_database.h" | 12 #include "chrome/browser/history/archived_database.h" |
13 #include "chrome/browser/history/history_database.h" | 13 #include "chrome/browser/history/history_database.h" |
14 #include "chrome/browser/history/history_notifications.h" | 14 #include "chrome/browser/history/history_notifications.h" |
15 #include "chrome/browser/history/text_database_manager.h" | 15 #include "chrome/browser/history/text_database_manager.h" |
16 #include "chrome/browser/history/thumbnail_database.h" | 16 #include "chrome/browser/history/thumbnail_database.h" |
17 #include "chrome/common/notification_types.h" | 17 #include "chrome/common/notification_types.h" |
18 | 18 |
| 19 using base::Time; |
| 20 using base::TimeDelta; |
| 21 |
19 namespace history { | 22 namespace history { |
20 | 23 |
21 namespace { | 24 namespace { |
22 | 25 |
23 // Returns true if this visit is worth archiving. Otherwise, this visit is not | 26 // Returns true if this visit is worth archiving. Otherwise, this visit is not |
24 // worth saving (for example, subframe navigations and redirects) and we can | 27 // worth saving (for example, subframe navigations and redirects) and we can |
25 // just delete it when it gets old. | 28 // just delete it when it gets old. |
26 bool ShouldArchiveVisit(const VisitRow& visit) { | 29 bool ShouldArchiveVisit(const VisitRow& visit) { |
27 int no_qualifier = PageTransition::StripQualifier(visit.transition); | 30 int no_qualifier = PageTransition::StripQualifier(visit.transition); |
28 | 31 |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 // bookmark service is loaded on a separate thread and may not be done by the | 492 // bookmark service is loaded on a separate thread and may not be done by the |
490 // time we get here. We therefor block until the bookmarks have finished | 493 // time we get here. We therefor block until the bookmarks have finished |
491 // loading. | 494 // loading. |
492 if (bookmark_service_) | 495 if (bookmark_service_) |
493 bookmark_service_->BlockTillLoaded(); | 496 bookmark_service_->BlockTillLoaded(); |
494 return bookmark_service_; | 497 return bookmark_service_; |
495 } | 498 } |
496 | 499 |
497 } // namespace history | 500 } // namespace history |
498 | 501 |
OLD | NEW |