| OLD | NEW |
| 1 // Copyright (c) 2009 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_EXPIRE_HISTORY_BACKEND_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H__ |
| 6 #define CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H_ | 6 #define CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H__ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/task.h" | 13 #include "base/task.h" |
| 14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 #include "base/scoped_ptr.h" | 15 #include "base/scoped_ptr.h" |
| 16 #include "chrome/browser/history/history_types.h" | 16 #include "chrome/browser/history/history_types.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 29 class TextDatabaseManager; | 29 class TextDatabaseManager; |
| 30 class ThumbnailDatabase; | 30 class ThumbnailDatabase; |
| 31 | 31 |
| 32 // Delegate used to broadcast notifications to the main thread. | 32 // Delegate used to broadcast notifications to the main thread. |
| 33 class BroadcastNotificationDelegate { | 33 class BroadcastNotificationDelegate { |
| 34 public: | 34 public: |
| 35 // Schedules a broadcast of the given notification on the application main | 35 // Schedules a broadcast of the given notification on the application main |
| 36 // thread. The details argument will have ownership taken by this function. | 36 // thread. The details argument will have ownership taken by this function. |
| 37 virtual void BroadcastNotifications(NotificationType type, | 37 virtual void BroadcastNotifications(NotificationType type, |
| 38 HistoryDetails* details_deleted) = 0; | 38 HistoryDetails* details_deleted) = 0; |
| 39 | |
| 40 protected: | |
| 41 ~BroadcastNotificationDelegate() {} | |
| 42 }; | 39 }; |
| 43 | 40 |
| 44 // Encapsulates visit expiration criteria and type of visits to expire. | 41 // Encapsulates visit expiration criteria and type of visits to expire. |
| 45 class ExpiringVisitsReader { | 42 class ExpiringVisitsReader { |
| 46 public: | 43 public: |
| 47 virtual ~ExpiringVisitsReader() {} | 44 virtual ~ExpiringVisitsReader() {} |
| 48 // Populates |visits| from |db|, using provided |end_time| and |max_visits| | 45 // Populates |visits| from |db|, using provided |end_time| and |max_visits| |
| 49 // cap. | 46 // cap. |
| 50 virtual bool Read(base::Time end_time, HistoryDatabase* db, | 47 virtual bool Read(base::Time end_time, HistoryDatabase* db, |
| 51 VisitVector* visits, int max_visits) const = 0; | 48 VisitVector* visits, int max_visits) const = 0; |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 // | 270 // |
| 274 // Use GetBookmarkService to access this, which makes sure the service is | 271 // Use GetBookmarkService to access this, which makes sure the service is |
| 275 // loaded. | 272 // loaded. |
| 276 BookmarkService* bookmark_service_; | 273 BookmarkService* bookmark_service_; |
| 277 | 274 |
| 278 DISALLOW_EVIL_CONSTRUCTORS(ExpireHistoryBackend); | 275 DISALLOW_EVIL_CONSTRUCTORS(ExpireHistoryBackend); |
| 279 }; | 276 }; |
| 280 | 277 |
| 281 } // namespace history | 278 } // namespace history |
| 282 | 279 |
| 283 #endif // CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H_ | 280 #endif // CHROME_BROWSER_HISTORY_EXPIRE_HISTORY_BACKEND_H__ |
| OLD | NEW |