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 // *See the .cc file for more information on the design.* | 41 // *See the .cc file for more information on the design.* |
45 // | 42 // |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 void SetFaviconsOutOfDateForPage(const GURL& page_url); | 282 void SetFaviconsOutOfDateForPage(const GURL& page_url); |
286 | 283 |
287 void CloneFavicons(const GURL& old_page_url, const GURL& new_page_url); | 284 void CloneFavicons(const GURL& old_page_url, const GURL& new_page_url); |
288 | 285 |
289 void SetImportedFavicons( | 286 void SetImportedFavicons( |
290 const std::vector<ImportedFaviconUsage>& favicon_usage); | 287 const std::vector<ImportedFaviconUsage>& favicon_usage); |
291 | 288 |
292 // Downloads ----------------------------------------------------------------- | 289 // Downloads ----------------------------------------------------------------- |
293 | 290 |
294 void GetNextDownloadId(scoped_refptr<DownloadNextIdRequest> request); | 291 void GetNextDownloadId(scoped_refptr<DownloadNextIdRequest> request); |
295 void QueryDownloads(scoped_refptr<DownloadQueryRequest> request); | 292 void QueryDownloads(const HistoryService::DownloadQueryCallback& callback); |
296 void CleanUpInProgressEntries(); | 293 void CleanUpInProgressEntries(); |
297 void UpdateDownload(const content::DownloadPersistentStoreInfo& data); | 294 void UpdateDownload(const DownloadPersistentStoreInfo& data); |
298 void UpdateDownloadPath(const FilePath& path, int64 db_handle); | 295 void CreateDownload(const DownloadPersistentStoreInfo& info, |
299 void CreateDownload(scoped_refptr<DownloadCreateRequest> request, | 296 const HistoryService::DownloadCreateCallback& callback); |
300 int32 id, | 297 void GetVisibleVisitCountToHostSimple( |
301 const content::DownloadPersistentStoreInfo& info); | 298 const GURL& url, |
302 void RemoveDownload(int64 db_handle); | 299 const HistoryService::GetVisibleVisitCountToHostSimpleCallback& callback); |
303 void RemoveDownloadsBetween(const base::Time remove_begin, | 300 void RemoveDownloads(const std::set<int64>& handles); |
304 const base::Time remove_end); | |
305 void RemoveDownloads(const base::Time remove_end); | |
306 | 301 |
307 // Segment usage ------------------------------------------------------------- | 302 // Segment usage ------------------------------------------------------------- |
308 | 303 |
309 void QuerySegmentUsage(scoped_refptr<QuerySegmentUsageRequest> request, | 304 void QuerySegmentUsage(scoped_refptr<QuerySegmentUsageRequest> request, |
310 const base::Time from_time, | 305 const base::Time from_time, |
311 int max_result_count); | 306 int max_result_count); |
312 void DeleteOldSegmentData(); | 307 void DeleteOldSegmentData(); |
313 void SetSegmentPresentationIndex(SegmentID segment_id, int index); | 308 void SetSegmentPresentationIndex(SegmentID segment_id, int index); |
314 | 309 |
315 // Keyword search terms ------------------------------------------------------ | 310 // Keyword search terms ------------------------------------------------------ |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 // Used to provide the Android ContentProvider APIs. | 848 // Used to provide the Android ContentProvider APIs. |
854 scoped_ptr<AndroidProviderBackend> android_provider_backend_; | 849 scoped_ptr<AndroidProviderBackend> android_provider_backend_; |
855 #endif | 850 #endif |
856 | 851 |
857 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 852 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
858 }; | 853 }; |
859 | 854 |
860 } // namespace history | 855 } // namespace history |
861 | 856 |
862 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 857 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
OLD | NEW |