| 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/files/file_enumerator.h" | 13 #include "base/files/file_enumerator.h" |
| 14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.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/history/history_database.h" | |
| 18 #include "components/history/core/browser/history_backend_notifier.h" | 17 #include "components/history/core/browser/history_backend_notifier.h" |
| 19 #include "components/history/core/browser/history_client.h" | 18 #include "components/history/core/browser/history_client.h" |
| 19 #include "components/history/core/browser/history_database.h" |
| 20 #include "components/history/core/browser/thumbnail_database.h" | 20 #include "components/history/core/browser/thumbnail_database.h" |
| 21 | 21 |
| 22 namespace history { | 22 namespace history { |
| 23 | 23 |
| 24 // Helpers -------------------------------------------------------------------- | 24 // Helpers -------------------------------------------------------------------- |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 // The number of days by which the expiration threshold is advanced for items | 28 // The number of days by which the expiration threshold is advanced for items |
| 29 // that we want to expire early, such as those of AUTO_SUBFRAME transition type. | 29 // that we want to expire early, such as those of AUTO_SUBFRAME transition type. |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 HistoryClient* ExpireHistoryBackend::GetHistoryClient() { | 506 HistoryClient* ExpireHistoryBackend::GetHistoryClient() { |
| 507 // We use the history client to determine if a URL is bookmarked. The data is | 507 // We use the history client to determine if a URL is bookmarked. The data is |
| 508 // loaded on a separate thread and may not be done by the time we get here. | 508 // loaded on a separate thread and may not be done by the time we get here. |
| 509 // We therefore block until the bookmarks have finished loading. | 509 // We therefore block until the bookmarks have finished loading. |
| 510 if (history_client_) | 510 if (history_client_) |
| 511 history_client_->BlockUntilBookmarksLoaded(); | 511 history_client_->BlockUntilBookmarksLoaded(); |
| 512 return history_client_; | 512 return history_client_; |
| 513 } | 513 } |
| 514 | 514 |
| 515 } // namespace history | 515 } // namespace history |
| OLD | NEW |