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> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/containers/mru_cache.h" | 13 #include "base/containers/mru_cache.h" |
14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
15 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
16 #include "base/memory/memory_pressure_listener.h" | 16 #include "base/memory/memory_pressure_listener.h" |
17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
18 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
19 #include "base/single_thread_task_runner.h" | 19 #include "base/single_thread_task_runner.h" |
20 #include "base/task/cancelable_task_tracker.h" | 20 #include "base/task/cancelable_task_tracker.h" |
21 #include "components/favicon_base/favicon_usage_data.h" | 21 #include "components/favicon_base/favicon_usage_data.h" |
22 #include "components/history/core/browser/expire_history_backend.h" | 22 #include "components/history/core/browser/expire_history_backend.h" |
23 #include "components/history/core/browser/history_backend_notifier.h" | 23 #include "components/history/core/browser/history_backend_notifier.h" |
24 #include "components/history/core/browser/history_types.h" | 24 #include "components/history/core/browser/history_types.h" |
25 #include "components/history/core/browser/keyword_id.h" | 25 #include "components/history/core/browser/keyword_id.h" |
26 #include "components/history/core/browser/thumbnail_database.h" | 26 #include "components/history/core/browser/thumbnail_database.h" |
27 #include "components/history/core/browser/visit_tracker.h" | 27 #include "components/history/core/browser/visit_tracker.h" |
28 #include "components/visitedlink/browser/visitedlink_delegate.h" | |
29 #include "sql/init_status.h" | 28 #include "sql/init_status.h" |
30 | 29 |
31 #if defined(OS_ANDROID) | 30 #if defined(OS_ANDROID) |
32 #include "components/history/core/browser/android/android_history_types.h" | 31 #include "components/history/core/browser/android/android_history_types.h" |
33 #endif | 32 #endif |
34 | 33 |
35 class HistoryURLProvider; | 34 class HistoryURLProvider; |
36 struct HistoryURLProviderParams; | 35 struct HistoryURLProviderParams; |
37 class SkBitmap; | 36 class SkBitmap; |
38 class TestingProfile; | 37 class TestingProfile; |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 const GURL& url, | 212 const GURL& url, |
214 base::Time end_ts); | 213 base::Time end_ts); |
215 | 214 |
216 // Querying ------------------------------------------------------------------ | 215 // Querying ------------------------------------------------------------------ |
217 | 216 |
218 // Run the |callback| on the History thread. | 217 // Run the |callback| on the History thread. |
219 // |callback| should handle the NULL database case. | 218 // |callback| should handle the NULL database case. |
220 void ScheduleAutocomplete(const base::Callback< | 219 void ScheduleAutocomplete(const base::Callback< |
221 void(history::HistoryBackend*, history::URLDatabase*)>& callback); | 220 void(history::HistoryBackend*, history::URLDatabase*)>& callback); |
222 | 221 |
223 void IterateURLs( | |
224 const scoped_refptr<visitedlink::VisitedLinkDelegate::URLEnumerator>& | |
225 enumerator); | |
226 void QueryURL(const GURL& url, | 222 void QueryURL(const GURL& url, |
227 bool want_visits, | 223 bool want_visits, |
228 QueryURLResult* query_url_result); | 224 QueryURLResult* query_url_result); |
229 void QueryHistory(const base::string16& text_query, | 225 void QueryHistory(const base::string16& text_query, |
230 const QueryOptions& options, | 226 const QueryOptions& options, |
231 QueryResults* query_results); | 227 QueryResults* query_results); |
232 | 228 |
233 // Computes the most recent URL(s) that the given canonical URL has | 229 // Computes the most recent URL(s) that the given canonical URL has |
234 // redirected to. There may be more than one redirect in a row, so this | 230 // redirected to. There may be more than one redirect in a row, so this |
235 // function will fill the given array with the entire chain. If there are | 231 // function will fill the given array with the entire chain. If there are |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 | 917 |
922 // List of observers | 918 // List of observers |
923 ObserverList<HistoryBackendObserver> observers_; | 919 ObserverList<HistoryBackendObserver> observers_; |
924 | 920 |
925 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 921 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
926 }; | 922 }; |
927 | 923 |
928 } // namespace history | 924 } // namespace history |
929 | 925 |
930 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 926 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
OLD | NEW |