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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 // |languages| gives a list of language encodings with which the history | 119 // |languages| gives a list of language encodings with which the history |
120 // URLs and omnibox searches are interpreted. | 120 // URLs and omnibox searches are interpreted. |
121 // |force_fail| can be set during unittests to unconditionally fail to init. | 121 // |force_fail| can be set during unittests to unconditionally fail to init. |
122 void Init(const std::string& languages, bool force_fail); | 122 void Init(const std::string& languages, bool force_fail); |
123 | 123 |
124 // Notification that the history system is shutting down. This will break | 124 // Notification that the history system is shutting down. This will break |
125 // the refs owned by the delegate and any pending transaction so it will | 125 // the refs owned by the delegate and any pending transaction so it will |
126 // actually be deleted. | 126 // actually be deleted. |
127 void Closing(); | 127 void Closing(); |
128 | 128 |
129 // See NotifyRenderProcessHostDestruction. | 129 void ClearCachedDataForContextID(ContextID context_id); |
130 void NotifyRenderProcessHostDestruction(const void* host); | |
131 | 130 |
132 // Navigation ---------------------------------------------------------------- | 131 // Navigation ---------------------------------------------------------------- |
133 | 132 |
134 // |request.time| must be unique with high probability. | 133 // |request.time| must be unique with high probability. |
135 void AddPage(const HistoryAddPageArgs& request); | 134 void AddPage(const HistoryAddPageArgs& request); |
136 virtual void SetPageTitle(const GURL& url, const base::string16& title); | 135 virtual void SetPageTitle(const GURL& url, const base::string16& title); |
137 void AddPageNoVisitForBookmark(const GURL& url, const base::string16& title); | 136 void AddPageNoVisitForBookmark(const GURL& url, const base::string16& title); |
138 | 137 void UpdateWithPageEndTime(ContextID context_id, |
139 // Updates the database backend with a page's ending time stamp information. | |
140 // The page can be identified by the combination of the pointer to | |
141 // a RenderProcessHost, the page id and the url. | |
142 // | |
143 // The given pointer will not be dereferenced, it is only used for | |
144 // identification purposes, hence it is a void*. | |
145 void UpdateWithPageEndTime(const void* host, | |
146 int32 page_id, | 138 int32 page_id, |
147 const GURL& url, | 139 const GURL& url, |
148 base::Time end_ts); | 140 base::Time end_ts); |
149 | 141 |
150 // Querying ------------------------------------------------------------------ | 142 // Querying ------------------------------------------------------------------ |
151 | 143 |
152 // ScheduleAutocomplete() never frees |provider| (which is globally live). | 144 // ScheduleAutocomplete() never frees |provider| (which is globally live). |
153 // It passes |params| on to the autocomplete system which will eventually | 145 // It passes |params| on to the autocomplete system which will eventually |
154 // free it. | 146 // free it. |
155 void ScheduleAutocomplete(HistoryURLProvider* provider, | 147 void ScheduleAutocomplete(HistoryURLProvider* provider, |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 | 871 |
880 // Listens for the system being under memory pressure. | 872 // Listens for the system being under memory pressure. |
881 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; | 873 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; |
882 | 874 |
883 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 875 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
884 }; | 876 }; |
885 | 877 |
886 } // namespace history | 878 } // namespace history |
887 | 879 |
888 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 880 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
OLD | NEW |