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 <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "base/memory/mru_cache.h" | 13 #include "base/memory/mru_cache.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "chrome/browser/cancelable_request.h" | 15 #include "chrome/browser/cancelable_request.h" |
16 #include "chrome/browser/history/archived_database.h" | 16 #include "chrome/browser/history/archived_database.h" |
17 #include "chrome/browser/history/expire_history_backend.h" | 17 #include "chrome/browser/history/expire_history_backend.h" |
18 #include "chrome/browser/history/history_database.h" | 18 #include "chrome/browser/history/history_database.h" |
19 #include "chrome/browser/history/history_marshaling.h" | 19 #include "chrome/browser/history/history_marshaling.h" |
20 #include "chrome/browser/history/history_types.h" | 20 #include "chrome/browser/history/history_types.h" |
21 #include "chrome/browser/history/text_database_manager.h" | 21 #include "chrome/browser/history/text_database_manager.h" |
22 #include "chrome/browser/history/thumbnail_database.h" | 22 #include "chrome/browser/history/thumbnail_database.h" |
23 #include "chrome/browser/history/visit_tracker.h" | 23 #include "chrome/browser/history/visit_tracker.h" |
24 #include "chrome/browser/search_engines/template_url_id.h" | 24 #include "chrome/browser/search_engines/template_url_id.h" |
25 #include "sql/init_status.h" | 25 #include "sql/init_status.h" |
26 #include "ui/base/layout.h" | 26 #include "ui/base/layout.h" |
27 | 27 |
28 class BookmarkService; | 28 class BookmarkService; |
29 class TestingProfile; | 29 class TestingProfile; |
| 30 struct DownloadPersistentStoreInfo; |
30 struct ThumbnailScore; | 31 struct ThumbnailScore; |
31 | 32 |
32 namespace content { | |
33 struct DownloadPersistentStoreInfo; | |
34 } | |
35 | |
36 namespace history { | 33 namespace history { |
37 #if defined(OS_ANDROID) | 34 #if defined(OS_ANDROID) |
38 class AndroidProviderBackend; | 35 class AndroidProviderBackend; |
39 #endif | 36 #endif |
40 class CommitLaterTask; | 37 class CommitLaterTask; |
41 class HistoryPublisher; | 38 class HistoryPublisher; |
42 class VisitFilter; | 39 class VisitFilter; |
43 | 40 |
44 // The maximum number of icons URLs per page which can be stored in the | 41 // The maximum number of icons URLs per page which can be stored in the |
45 // thumbnail database. | 42 // thumbnail database. |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 void SetFaviconsOutOfDateForPage(const GURL& page_url); | 296 void SetFaviconsOutOfDateForPage(const GURL& page_url); |
300 | 297 |
301 void CloneFavicons(const GURL& old_page_url, const GURL& new_page_url); | 298 void CloneFavicons(const GURL& old_page_url, const GURL& new_page_url); |
302 | 299 |
303 void SetImportedFavicons( | 300 void SetImportedFavicons( |
304 const std::vector<ImportedFaviconUsage>& favicon_usage); | 301 const std::vector<ImportedFaviconUsage>& favicon_usage); |
305 | 302 |
306 // Downloads ----------------------------------------------------------------- | 303 // Downloads ----------------------------------------------------------------- |
307 | 304 |
308 void GetNextDownloadId(scoped_refptr<DownloadNextIdRequest> request); | 305 void GetNextDownloadId(scoped_refptr<DownloadNextIdRequest> request); |
309 void QueryDownloads(scoped_refptr<DownloadQueryRequest> request); | 306 void QueryDownloads(const HistoryService::DownloadQueryCallback& callback); |
310 void CleanUpInProgressEntries(); | 307 void CleanUpInProgressEntries(); |
311 void UpdateDownload(const content::DownloadPersistentStoreInfo& data); | 308 void UpdateDownload(const DownloadPersistentStoreInfo& data); |
312 void UpdateDownloadPath(const FilePath& path, int64 db_handle); | 309 void CreateDownload(const DownloadPersistentStoreInfo& info, |
313 void CreateDownload(scoped_refptr<DownloadCreateRequest> request, | 310 const HistoryService::DownloadCreateCallback& callback); |
314 int32 id, | 311 void GetVisibleVisitCountToHostSimple( |
315 const content::DownloadPersistentStoreInfo& info); | 312 const GURL& url, |
316 void RemoveDownload(int64 db_handle); | 313 const HistoryService::GetVisibleVisitCountToHostSimpleCallback& callback); |
317 void RemoveDownloadsBetween(const base::Time remove_begin, | 314 void RemoveDownloads(const std::set<int64>& handles); |
318 const base::Time remove_end); | |
319 void RemoveDownloads(const base::Time remove_end); | |
320 | 315 |
321 // Segment usage ------------------------------------------------------------- | 316 // Segment usage ------------------------------------------------------------- |
322 | 317 |
323 void QuerySegmentUsage(scoped_refptr<QuerySegmentUsageRequest> request, | 318 void QuerySegmentUsage(scoped_refptr<QuerySegmentUsageRequest> request, |
324 const base::Time from_time, | 319 const base::Time from_time, |
325 int max_result_count); | 320 int max_result_count); |
326 void DeleteOldSegmentData(); | 321 void DeleteOldSegmentData(); |
327 void SetSegmentPresentationIndex(SegmentID segment_id, int index); | 322 void SetSegmentPresentationIndex(SegmentID segment_id, int index); |
328 | 323 |
329 // Keyword search terms ------------------------------------------------------ | 324 // Keyword search terms ------------------------------------------------------ |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 // Used to provide the Android ContentProvider APIs. | 868 // Used to provide the Android ContentProvider APIs. |
874 scoped_ptr<AndroidProviderBackend> android_provider_backend_; | 869 scoped_ptr<AndroidProviderBackend> android_provider_backend_; |
875 #endif | 870 #endif |
876 | 871 |
877 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 872 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
878 }; | 873 }; |
879 | 874 |
880 } // namespace history | 875 } // namespace history |
881 | 876 |
882 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 877 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
OLD | NEW |