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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 // | 117 // |
118 // This function is NOT guaranteed to be called. If there is an error, | 118 // This function is NOT guaranteed to be called. If there is an error, |
119 // there may be no in-memory database. | 119 // there may be no in-memory database. |
120 virtual void SetInMemoryBackend( | 120 virtual void SetInMemoryBackend( |
121 scoped_ptr<InMemoryHistoryBackend> backend) = 0; | 121 scoped_ptr<InMemoryHistoryBackend> backend) = 0; |
122 | 122 |
123 // Notify HistoryService that some URLs favicon changed that will forward | 123 // Notify HistoryService that some URLs favicon changed that will forward |
124 // the events to the FaviconChangedObservers in the correct thread. | 124 // the events to the FaviconChangedObservers in the correct thread. |
125 virtual void NotifyFaviconChanged(const std::set<GURL>& urls) = 0; | 125 virtual void NotifyFaviconChanged(const std::set<GURL>& urls) = 0; |
126 | 126 |
127 // Notify HistoryService that the user is visiting an URL. The event will | |
128 // be forwarded to the HistoryServiceObservers in the correct thread. | |
129 virtual void NotifyURLVisited(ui::PageTransition transition, | |
130 const URLRow& row, | |
131 const RedirectList& redirects, | |
132 const base::Time& visit_time) = 0; | |
brettw
2014/10/07 16:47:39
I usually pass times by copy, since a time is real
sdefresne
2014/10/09 09:38:15
Apparently not using const reference is the most c
| |
133 | |
127 // Broadcasts the specified notification to the notification service. | 134 // Broadcasts the specified notification to the notification service. |
128 // This is implemented here because notifications must only be sent from | 135 // This is implemented here because notifications must only be sent from |
129 // the main thread. This is the only method that doesn't identify the | 136 // the main thread. This is the only method that doesn't identify the |
130 // caller because notifications must always be sent. | 137 // caller because notifications must always be sent. |
131 virtual void BroadcastNotifications(int type, | 138 virtual void BroadcastNotifications(int type, |
132 scoped_ptr<HistoryDetails> details) = 0; | 139 scoped_ptr<HistoryDetails> details) = 0; |
133 | 140 |
134 // Invoked when the backend has finished loading the db. | 141 // Invoked when the backend has finished loading the db. |
135 virtual void DBLoaded() = 0; | 142 virtual void DBLoaded() = 0; |
136 | 143 |
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
892 | 899 |
893 // Listens for the system being under memory pressure. | 900 // Listens for the system being under memory pressure. |
894 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; | 901 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; |
895 | 902 |
896 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 903 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
897 }; | 904 }; |
898 | 905 |
899 } // namespace history | 906 } // namespace history |
900 | 907 |
901 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 908 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
OLD | NEW |