| 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 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 | 126 |
| 127 // ExpireHistoryBackend ------------------------------------------------------- | 127 // ExpireHistoryBackend ------------------------------------------------------- |
| 128 | 128 |
| 129 ExpireHistoryBackend::ExpireHistoryBackend( | 129 ExpireHistoryBackend::ExpireHistoryBackend( |
| 130 BroadcastNotificationDelegate* delegate, | 130 BroadcastNotificationDelegate* delegate, |
| 131 HistoryClient* history_client) | 131 HistoryClient* history_client) |
| 132 : delegate_(delegate), | 132 : delegate_(delegate), |
| 133 main_db_(NULL), | 133 main_db_(NULL), |
| 134 thumb_db_(NULL), | 134 thumb_db_(NULL), |
| 135 weak_factory_(this), | 135 history_client_(history_client), |
| 136 history_client_(history_client) { | 136 weak_factory_(this) { |
| 137 } | 137 } |
| 138 | 138 |
| 139 ExpireHistoryBackend::~ExpireHistoryBackend() { | 139 ExpireHistoryBackend::~ExpireHistoryBackend() { |
| 140 } | 140 } |
| 141 | 141 |
| 142 void ExpireHistoryBackend::SetDatabases(HistoryDatabase* main_db, | 142 void ExpireHistoryBackend::SetDatabases(HistoryDatabase* main_db, |
| 143 ThumbnailDatabase* thumb_db) { | 143 ThumbnailDatabase* thumb_db) { |
| 144 main_db_ = main_db; | 144 main_db_ = main_db; |
| 145 thumb_db_ = thumb_db; | 145 thumb_db_ = thumb_db; |
| 146 } | 146 } |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 HistoryClient* ExpireHistoryBackend::GetHistoryClient() { | 516 HistoryClient* ExpireHistoryBackend::GetHistoryClient() { |
| 517 // We use the history client to determine if a URL is bookmarked. The data is | 517 // We use the history client to determine if a URL is bookmarked. The data is |
| 518 // loaded on a separate thread and may not be done by the time we get here. | 518 // loaded on a separate thread and may not be done by the time we get here. |
| 519 // We therefore block until the bookmarks have finished loading. | 519 // We therefore block until the bookmarks have finished loading. |
| 520 if (history_client_) | 520 if (history_client_) |
| 521 history_client_->BlockUntilBookmarksLoaded(); | 521 history_client_->BlockUntilBookmarksLoaded(); |
| 522 return history_client_; | 522 return history_client_; |
| 523 } | 523 } |
| 524 | 524 |
| 525 } // namespace history | 525 } // namespace history |
| OLD | NEW |