Chromium Code Reviews| 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 #ifndef CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
| 6 #define CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 #endif | 50 #endif |
| 51 | 51 |
| 52 class CommitLaterTask; | 52 class CommitLaterTask; |
| 53 struct DownloadRow; | 53 struct DownloadRow; |
| 54 class HistoryBackendObserver; | 54 class HistoryBackendObserver; |
| 55 class HistoryClient; | 55 class HistoryClient; |
| 56 struct HistoryDetails; | 56 struct HistoryDetails; |
| 57 class HistoryDBTask; | 57 class HistoryDBTask; |
| 58 class InMemoryHistoryBackend; | 58 class InMemoryHistoryBackend; |
| 59 class TypedUrlSyncableService; | 59 class TypedUrlSyncableService; |
| 60 struct URLsDeletedDetails; | |
| 60 class VisitFilter; | 61 class VisitFilter; |
| 61 | 62 |
| 62 // The maximum number of icons URLs per page which can be stored in the | 63 // The maximum number of icons URLs per page which can be stored in the |
| 63 // thumbnail database. | 64 // thumbnail database. |
| 64 static const size_t kMaxFaviconsPerPage = 8; | 65 static const size_t kMaxFaviconsPerPage = 8; |
| 65 | 66 |
| 66 // The maximum number of bitmaps for a single icon URL which can be stored in | 67 // The maximum number of bitmaps for a single icon URL which can be stored in |
| 67 // the thumbnail database. | 68 // the thumbnail database. |
| 68 static const size_t kMaxFaviconBitmapsPerIconURL = 8; | 69 static const size_t kMaxFaviconBitmapsPerIconURL = 8; |
| 69 | 70 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 136 // be forwarded to the HistoryServiceObservers in the correct thread. | 137 // be forwarded to the HistoryServiceObservers in the correct thread. |
| 137 virtual void NotifyURLVisited(ui::PageTransition transition, | 138 virtual void NotifyURLVisited(ui::PageTransition transition, |
| 138 const URLRow& row, | 139 const URLRow& row, |
| 139 const RedirectList& redirects, | 140 const RedirectList& redirects, |
| 140 base::Time visit_time) = 0; | 141 base::Time visit_time) = 0; |
| 141 | 142 |
| 142 // Notify HistoryService that some URLs have been modified. The event will | 143 // Notify HistoryService that some URLs have been modified. The event will |
| 143 // be forwarded to the HistoryServiceObservers in the correct thread. | 144 // be forwarded to the HistoryServiceObservers in the correct thread. |
| 144 virtual void NotifyURLsModified(const URLRows& changed_urls) = 0; | 145 virtual void NotifyURLsModified(const URLRows& changed_urls) = 0; |
| 145 | 146 |
| 147 // Notify HistoryService that some or all of the URLs have been deleted. | |
| 148 // The event will be forwarded to the HistoryServiceObservers in the correct | |
| 149 // thread. | |
| 150 virtual void NotifyURLsDeleted( | |
| 151 const URLsDeletedDetails& deleted_details) = 0; | |
|
sdefresne
2014/12/04 17:21:12
I'd prefer if we also stopped using URLsDeletedDet
nshaik
2014/12/07 09:34:49
Done.
| |
| 152 | |
| 146 // Broadcasts the specified notification to the notification service. | 153 // Broadcasts the specified notification to the notification service. |
| 147 // This is implemented here because notifications must only be sent from | 154 // This is implemented here because notifications must only be sent from |
| 148 // the main thread. This is the only method that doesn't identify the | 155 // the main thread. This is the only method that doesn't identify the |
| 149 // caller because notifications must always be sent. | 156 // caller because notifications must always be sent. |
| 150 virtual void BroadcastNotifications(int type, | 157 virtual void BroadcastNotifications(int type, |
| 151 scoped_ptr<HistoryDetails> details) = 0; | 158 scoped_ptr<HistoryDetails> details) = 0; |
| 152 | 159 |
| 153 // Invoked when the backend has finished loading the db. | 160 // Invoked when the backend has finished loading the db. |
| 154 virtual void DBLoaded() = 0; | 161 virtual void DBLoaded() = 0; |
| 155 }; | 162 }; |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 575 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetFaviconsFromDBIconType); | 582 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetFaviconsFromDBIconType); |
| 576 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetFaviconsFromDBExpired); | 583 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetFaviconsFromDBExpired); |
| 577 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, | 584 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, |
| 578 UpdateFaviconMappingsAndFetchNoDB); | 585 UpdateFaviconMappingsAndFetchNoDB); |
| 579 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, | 586 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, |
| 580 CloneFaviconIsRestrictedToSameDomain); | 587 CloneFaviconIsRestrictedToSameDomain); |
| 581 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, QueryFilteredURLs); | 588 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, QueryFilteredURLs); |
| 582 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, UpdateVisitDuration); | 589 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, UpdateVisitDuration); |
| 583 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, ExpireHistoryForTimes); | 590 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, ExpireHistoryForTimes); |
| 584 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, DeleteFTSIndexDatabases); | 591 FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, DeleteFTSIndexDatabases); |
| 585 | 592 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceTypedUrlTest, |
| 593 ProcessUserChangeRemove); | |
| 586 friend class ::TestingProfile; | 594 friend class ::TestingProfile; |
| 587 | 595 |
| 588 // Computes the name of the specified database on disk. | 596 // Computes the name of the specified database on disk. |
| 589 base::FilePath GetArchivedFileName() const; | 597 base::FilePath GetArchivedFileName() const; |
| 590 base::FilePath GetThumbnailFileName() const; | 598 base::FilePath GetThumbnailFileName() const; |
| 591 | 599 |
| 592 // Returns the name of the Favicons database. This is the new name | 600 // Returns the name of the Favicons database. This is the new name |
| 593 // of the Thumbnails database. | 601 // of the Thumbnails database. |
| 594 base::FilePath GetFaviconsFileName() const; | 602 base::FilePath GetFaviconsFileName() const; |
| 595 | 603 |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 910 | 918 |
| 911 // List of observers | 919 // List of observers |
| 912 ObserverList<HistoryBackendObserver> observers_; | 920 ObserverList<HistoryBackendObserver> observers_; |
| 913 | 921 |
| 914 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 922 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
| 915 }; | 923 }; |
| 916 | 924 |
| 917 } // namespace history | 925 } // namespace history |
| 918 | 926 |
| 919 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 927 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
| OLD | NEW |