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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // Sets the in-memory history backend. The in-memory backend is created by | 112 // Sets the in-memory history backend. The in-memory backend is created by |
113 // the main backend. For non-unit tests, this happens on the background | 113 // the main backend. For non-unit tests, this happens on the background |
114 // thread. It is to be used on the main thread, so this would transfer | 114 // thread. It is to be used on the main thread, so this would transfer |
115 // it to the history service. Unit tests can override this behavior. | 115 // it to the history service. Unit tests can override this behavior. |
116 // | 116 // |
117 // This function is NOT guaranteed to be called. If there is an error, | 117 // This function is NOT guaranteed to be called. If there is an error, |
118 // there may be no in-memory database. | 118 // there may be no in-memory database. |
119 virtual void SetInMemoryBackend( | 119 virtual void SetInMemoryBackend( |
120 scoped_ptr<InMemoryHistoryBackend> backend) = 0; | 120 scoped_ptr<InMemoryHistoryBackend> backend) = 0; |
121 | 121 |
| 122 // Notify HistoryService that some URLs favicon changed that will forward |
| 123 // the events to the FaviconChangedObservers in the correct thread. |
| 124 virtual void NotifyFaviconChanged(const std::set<GURL>& urls) = 0; |
| 125 |
122 // Broadcasts the specified notification to the notification service. | 126 // Broadcasts the specified notification to the notification service. |
123 // This is implemented here because notifications must only be sent from | 127 // This is implemented here because notifications must only be sent from |
124 // the main thread. This is the only method that doesn't identify the | 128 // the main thread. This is the only method that doesn't identify the |
125 // caller because notifications must always be sent. | 129 // caller because notifications must always be sent. |
126 virtual void BroadcastNotifications(int type, | 130 virtual void BroadcastNotifications(int type, |
127 scoped_ptr<HistoryDetails> details) = 0; | 131 scoped_ptr<HistoryDetails> details) = 0; |
128 | 132 |
129 // Invoked when the backend has finished loading the db. | 133 // Invoked when the backend has finished loading the db. |
130 virtual void DBLoaded() = 0; | 134 virtual void DBLoaded() = 0; |
131 | 135 |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 | 905 |
902 // Listens for the system being under memory pressure. | 906 // Listens for the system being under memory pressure. |
903 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; | 907 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; |
904 | 908 |
905 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 909 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
906 }; | 910 }; |
907 | 911 |
908 } // namespace history | 912 } // namespace history |
909 | 913 |
910 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 914 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
OLD | NEW |