| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 void AddPage(const HistoryAddPageArgs& request); | 152 void AddPage(const HistoryAddPageArgs& request); |
| 153 virtual void SetPageTitle(const GURL& url, const base::string16& title); | 153 virtual void SetPageTitle(const GURL& url, const base::string16& title); |
| 154 void AddPageNoVisitForBookmark(const GURL& url, const base::string16& title); | 154 void AddPageNoVisitForBookmark(const GURL& url, const base::string16& title); |
| 155 void UpdateWithPageEndTime(ContextID context_id, | 155 void UpdateWithPageEndTime(ContextID context_id, |
| 156 int32 page_id, | 156 int32 page_id, |
| 157 const GURL& url, | 157 const GURL& url, |
| 158 base::Time end_ts); | 158 base::Time end_ts); |
| 159 | 159 |
| 160 // Querying ------------------------------------------------------------------ | 160 // Querying ------------------------------------------------------------------ |
| 161 | 161 |
| 162 // ScheduleAutocomplete() never frees |provider| (which is globally live). | 162 // Run the |callback| on the History thread. |
| 163 // It passes |params| on to the autocomplete system which will eventually | 163 // history_url_provider.h has the temporal ordering for |
| 164 // free it. | 164 // the call sequence. |
| 165 void ScheduleAutocomplete(HistoryURLProvider* provider, | 165 // |callback| should handle the NULL database case. |
| 166 HistoryURLProviderParams* params); | 166 void ScheduleAutocomplete(const base::Callback< |
| 167 void(history::HistoryBackend*, history::URLDatabase*)>& callback); |
| 167 | 168 |
| 168 void IterateURLs( | 169 void IterateURLs( |
| 169 const scoped_refptr<visitedlink::VisitedLinkDelegate::URLEnumerator>& | 170 const scoped_refptr<visitedlink::VisitedLinkDelegate::URLEnumerator>& |
| 170 enumerator); | 171 enumerator); |
| 171 void QueryURL(const GURL& url, | 172 void QueryURL(const GURL& url, |
| 172 bool want_visits, | 173 bool want_visits, |
| 173 QueryURLResult* query_url_result); | 174 QueryURLResult* query_url_result); |
| 174 void QueryHistory(const base::string16& text_query, | 175 void QueryHistory(const base::string16& text_query, |
| 175 const QueryOptions& options, | 176 const QueryOptions& options, |
| 176 QueryResults* query_results); | 177 QueryResults* query_results); |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 | 854 |
| 854 // Listens for the system being under memory pressure. | 855 // Listens for the system being under memory pressure. |
| 855 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; | 856 scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; |
| 856 | 857 |
| 857 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 858 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
| 858 }; | 859 }; |
| 859 | 860 |
| 860 } // namespace history | 861 } // namespace history |
| 861 | 862 |
| 862 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 863 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
| OLD | NEW |