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 | 26 |
27 class BookmarkService; | 27 class BookmarkService; |
28 class TestingProfile; | 28 class TestingProfile; |
| 29 struct DownloadPersistentStoreInfo; |
29 struct ThumbnailScore; | 30 struct ThumbnailScore; |
30 | 31 |
31 namespace content { | |
32 struct DownloadPersistentStoreInfo; | |
33 } | |
34 | |
35 namespace history { | 32 namespace history { |
36 #if defined(OS_ANDROID) | 33 #if defined(OS_ANDROID) |
37 class AndroidProviderBackend; | 34 class AndroidProviderBackend; |
38 #endif | 35 #endif |
39 class CommitLaterTask; | 36 class CommitLaterTask; |
40 class HistoryPublisher; | 37 class HistoryPublisher; |
41 class VisitFilter; | 38 class VisitFilter; |
42 | 39 |
43 // *See the .cc file for more information on the design.* | 40 // *See the .cc file for more information on the design.* |
44 // | 41 // |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 void CloneFavicon(const GURL& old_page_url, const GURL& new_page_url); | 270 void CloneFavicon(const GURL& old_page_url, const GURL& new_page_url); |
274 | 271 |
275 void SetImportedFavicons( | 272 void SetImportedFavicons( |
276 const std::vector<ImportedFaviconUsage>& favicon_usage); | 273 const std::vector<ImportedFaviconUsage>& favicon_usage); |
277 | 274 |
278 // Downloads ----------------------------------------------------------------- | 275 // Downloads ----------------------------------------------------------------- |
279 | 276 |
280 void GetNextDownloadId(scoped_refptr<DownloadNextIdRequest> request); | 277 void GetNextDownloadId(scoped_refptr<DownloadNextIdRequest> request); |
281 void QueryDownloads(scoped_refptr<DownloadQueryRequest> request); | 278 void QueryDownloads(scoped_refptr<DownloadQueryRequest> request); |
282 void CleanUpInProgressEntries(); | 279 void CleanUpInProgressEntries(); |
283 void UpdateDownload(const content::DownloadPersistentStoreInfo& data); | 280 void UpdateDownload(const DownloadPersistentStoreInfo& data); |
284 void UpdateDownloadPath(const FilePath& path, int64 db_handle); | |
285 void CreateDownload(scoped_refptr<DownloadCreateRequest> request, | 281 void CreateDownload(scoped_refptr<DownloadCreateRequest> request, |
286 int32 id, | 282 int32 id, |
287 const content::DownloadPersistentStoreInfo& info); | 283 const DownloadPersistentStoreInfo& info); |
288 void RemoveDownload(int64 db_handle); | 284 void RemoveDownloads(const std::set<int64>& handles); |
289 void RemoveDownloadsBetween(const base::Time remove_begin, | |
290 const base::Time remove_end); | |
291 void RemoveDownloads(const base::Time remove_end); | |
292 | 285 |
293 // Segment usage ------------------------------------------------------------- | 286 // Segment usage ------------------------------------------------------------- |
294 | 287 |
295 void QuerySegmentUsage(scoped_refptr<QuerySegmentUsageRequest> request, | 288 void QuerySegmentUsage(scoped_refptr<QuerySegmentUsageRequest> request, |
296 const base::Time from_time, | 289 const base::Time from_time, |
297 int max_result_count); | 290 int max_result_count); |
298 void DeleteOldSegmentData(); | 291 void DeleteOldSegmentData(); |
299 void SetSegmentPresentationIndex(SegmentID segment_id, int index); | 292 void SetSegmentPresentationIndex(SegmentID segment_id, int index); |
300 | 293 |
301 // Keyword search terms ------------------------------------------------------ | 294 // Keyword search terms ------------------------------------------------------ |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 // Used to provide the Android ContentProvider APIs. | 748 // Used to provide the Android ContentProvider APIs. |
756 scoped_ptr<AndroidProviderBackend> android_provider_backend_; | 749 scoped_ptr<AndroidProviderBackend> android_provider_backend_; |
757 #endif | 750 #endif |
758 | 751 |
759 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 752 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
760 }; | 753 }; |
761 | 754 |
762 } // namespace history | 755 } // namespace history |
763 | 756 |
764 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 757 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
OLD | NEW |