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 #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 <functional> | 8 #include <functional> |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
14 #include "base/files/file_enumerator.h" | 14 #include "base/files/file_enumerator.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
17 #include "chrome/browser/chrome_notification_types.h" | 17 #include "chrome/browser/chrome_notification_types.h" |
18 #include "chrome/browser/history/archived_database.h" | 18 #include "chrome/browser/history/archived_database.h" |
19 #include "chrome/browser/history/history_database.h" | 19 #include "chrome/browser/history/history_database.h" |
20 #include "chrome/browser/history/history_notifications.h" | 20 #include "chrome/browser/history/history_notifications.h" |
21 #include "chrome/browser/history/thumbnail_database.h" | 21 #include "chrome/browser/history/thumbnail_database.h" |
22 #include "components/bookmarks/core/browser/bookmark_service.h" | 22 #include "components/bookmarks/browser/bookmark_service.h" |
23 | 23 |
24 namespace history { | 24 namespace history { |
25 | 25 |
26 // Helpers -------------------------------------------------------------------- | 26 // Helpers -------------------------------------------------------------------- |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 // The number of days by which the expiration threshold is advanced for items | 30 // The number of days by which the expiration threshold is advanced for items |
31 // that we want to expire early, such as those of AUTO_SUBFRAME transition type. | 31 // that we want to expire early, such as those of AUTO_SUBFRAME transition type. |
32 // | 32 // |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 // We use the bookmark service to determine if a URL is bookmarked. The | 632 // We use the bookmark service to determine if a URL is bookmarked. The |
633 // bookmark service is loaded on a separate thread and may not be done by the | 633 // bookmark service is loaded on a separate thread and may not be done by the |
634 // time we get here. We therefor block until the bookmarks have finished | 634 // time we get here. We therefor block until the bookmarks have finished |
635 // loading. | 635 // loading. |
636 if (bookmark_service_) | 636 if (bookmark_service_) |
637 bookmark_service_->BlockTillLoaded(); | 637 bookmark_service_->BlockTillLoaded(); |
638 return bookmark_service_; | 638 return bookmark_service_; |
639 } | 639 } |
640 | 640 |
641 } // namespace history | 641 } // namespace history |
OLD | NEW |