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 |
(...skipping 11 matching lines...) Expand all Loading... |
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 ThumbnailScore; | 30 struct ThumbnailScore; |
31 | 31 |
32 namespace content { | |
33 struct DownloadPersistentStoreInfo; | |
34 } | |
35 | |
36 namespace history { | 32 namespace history { |
37 #if defined(OS_ANDROID) | 33 #if defined(OS_ANDROID) |
38 class AndroidProviderBackend; | 34 class AndroidProviderBackend; |
39 #endif | 35 #endif |
| 36 |
40 class CommitLaterTask; | 37 class CommitLaterTask; |
41 class HistoryPublisher; | 38 class HistoryPublisher; |
42 class VisitFilter; | 39 class VisitFilter; |
| 40 struct DownloadRow; |
43 | 41 |
44 // The maximum number of icons URLs per page which can be stored in the | 42 // The maximum number of icons URLs per page which can be stored in the |
45 // thumbnail database. | 43 // thumbnail database. |
46 static const size_t kMaxFaviconsPerPage = 8; | 44 static const size_t kMaxFaviconsPerPage = 8; |
47 | 45 |
48 // The maximum number of bitmaps for a single icon URL which can be stored in | 46 // The maximum number of bitmaps for a single icon URL which can be stored in |
49 // the thumbnail database. | 47 // the thumbnail database. |
50 static const size_t kMaxFaviconBitmapsPerIconURL = 8; | 48 static const size_t kMaxFaviconBitmapsPerIconURL = 8; |
51 | 49 |
52 // *See the .cc file for more information on the design.* | 50 // *See the .cc file for more information on the design.* |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 void CloneFavicons(const GURL& old_page_url, const GURL& new_page_url); | 299 void CloneFavicons(const GURL& old_page_url, const GURL& new_page_url); |
302 | 300 |
303 void SetImportedFavicons( | 301 void SetImportedFavicons( |
304 const std::vector<ImportedFaviconUsage>& favicon_usage); | 302 const std::vector<ImportedFaviconUsage>& favicon_usage); |
305 | 303 |
306 // Downloads ----------------------------------------------------------------- | 304 // Downloads ----------------------------------------------------------------- |
307 | 305 |
308 void GetNextDownloadId(scoped_refptr<DownloadNextIdRequest> request); | 306 void GetNextDownloadId(scoped_refptr<DownloadNextIdRequest> request); |
309 void QueryDownloads(scoped_refptr<DownloadQueryRequest> request); | 307 void QueryDownloads(scoped_refptr<DownloadQueryRequest> request); |
310 void CleanUpInProgressEntries(); | 308 void CleanUpInProgressEntries(); |
311 void UpdateDownload(const content::DownloadPersistentStoreInfo& data); | 309 void UpdateDownload(const DownloadRow& data); |
312 void UpdateDownloadPath(const FilePath& path, int64 db_handle); | |
313 void CreateDownload(scoped_refptr<DownloadCreateRequest> request, | 310 void CreateDownload(scoped_refptr<DownloadCreateRequest> request, |
314 int32 id, | 311 const DownloadRow& info); |
315 const content::DownloadPersistentStoreInfo& info); | 312 void RemoveDownloads(const std::set<int64>& db_handles); |
316 void RemoveDownload(int64 db_handle); | |
317 void RemoveDownloadsBetween(const base::Time remove_begin, | |
318 const base::Time remove_end); | |
319 void RemoveDownloads(const base::Time remove_end); | |
320 | 313 |
321 // Segment usage ------------------------------------------------------------- | 314 // Segment usage ------------------------------------------------------------- |
322 | 315 |
323 void QuerySegmentUsage(scoped_refptr<QuerySegmentUsageRequest> request, | 316 void QuerySegmentUsage(scoped_refptr<QuerySegmentUsageRequest> request, |
324 const base::Time from_time, | 317 const base::Time from_time, |
325 int max_result_count); | 318 int max_result_count); |
326 void DeleteOldSegmentData(); | 319 void DeleteOldSegmentData(); |
327 void SetSegmentPresentationIndex(SegmentID segment_id, int index); | 320 void SetSegmentPresentationIndex(SegmentID segment_id, int index); |
328 | 321 |
329 // Keyword search terms ------------------------------------------------------ | 322 // Keyword search terms ------------------------------------------------------ |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 // Used to provide the Android ContentProvider APIs. | 881 // Used to provide the Android ContentProvider APIs. |
889 scoped_ptr<AndroidProviderBackend> android_provider_backend_; | 882 scoped_ptr<AndroidProviderBackend> android_provider_backend_; |
890 #endif | 883 #endif |
891 | 884 |
892 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 885 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
893 }; | 886 }; |
894 | 887 |
895 } // namespace history | 888 } // namespace history |
896 | 889 |
897 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 890 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
OLD | NEW |