| 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> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/browser/history/history_types.h" | 21 #include "chrome/browser/history/history_types.h" |
| 22 #include "chrome/browser/history/text_database_manager.h" | 22 #include "chrome/browser/history/text_database_manager.h" |
| 23 #include "chrome/browser/history/thumbnail_database.h" | 23 #include "chrome/browser/history/thumbnail_database.h" |
| 24 #include "chrome/browser/history/visit_tracker.h" | 24 #include "chrome/browser/history/visit_tracker.h" |
| 25 #include "chrome/browser/search_engines/template_url_id.h" | 25 #include "chrome/browser/search_engines/template_url_id.h" |
| 26 #include "sql/init_status.h" | 26 #include "sql/init_status.h" |
| 27 #include "ui/base/layout.h" | 27 #include "ui/base/layout.h" |
| 28 | 28 |
| 29 class BookmarkService; | 29 class BookmarkService; |
| 30 class TestingProfile; | 30 class TestingProfile; |
| 31 class TypedUrlSyncableService; |
| 31 struct ThumbnailScore; | 32 struct ThumbnailScore; |
| 32 | 33 |
| 33 namespace history { | 34 namespace history { |
| 34 #if defined(OS_ANDROID) | 35 #if defined(OS_ANDROID) |
| 35 class AndroidProviderBackend; | 36 class AndroidProviderBackend; |
| 36 #endif | 37 #endif |
| 37 | 38 |
| 38 class CommitLaterTask; | 39 class CommitLaterTask; |
| 39 class HistoryPublisher; | 40 class HistoryPublisher; |
| 40 class VisitFilter; | 41 class VisitFilter; |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 | 423 |
| 423 virtual bool RemoveVisits(const VisitVector& visits); | 424 virtual bool RemoveVisits(const VisitVector& visits); |
| 424 | 425 |
| 425 // Returns the VisitSource associated with each one of the passed visits. | 426 // Returns the VisitSource associated with each one of the passed visits. |
| 426 // If there is no entry in the map for a given visit, that means the visit | 427 // If there is no entry in the map for a given visit, that means the visit |
| 427 // was SOURCE_BROWSED. Returns false if there is no HistoryDatabase.. | 428 // was SOURCE_BROWSED. Returns false if there is no HistoryDatabase.. |
| 428 bool GetVisitsSource(const VisitVector& visits, VisitSourceMap* sources); | 429 bool GetVisitsSource(const VisitVector& visits, VisitSourceMap* sources); |
| 429 | 430 |
| 430 virtual bool GetURL(const GURL& url, history::URLRow* url_row); | 431 virtual bool GetURL(const GURL& url, history::URLRow* url_row); |
| 431 | 432 |
| 433 // Returns the syncable service for syncing typed urls. The returned service |
| 434 // is owned by |this| object. |
| 435 virtual TypedUrlSyncableService* GetTypedUrlSyncableService() const; |
| 436 |
| 432 // Deleting ------------------------------------------------------------------ | 437 // Deleting ------------------------------------------------------------------ |
| 433 | 438 |
| 434 virtual void DeleteURLs(const std::vector<GURL>& urls); | 439 virtual void DeleteURLs(const std::vector<GURL>& urls); |
| 435 | 440 |
| 436 virtual void DeleteURL(const GURL& url); | 441 virtual void DeleteURL(const GURL& url); |
| 437 | 442 |
| 438 // Calls ExpireHistoryBackend::ExpireHistoryBetween and commits the change. | 443 // Calls ExpireHistoryBackend::ExpireHistoryBetween and commits the change. |
| 439 void ExpireHistoryBetween( | 444 void ExpireHistoryBetween( |
| 440 const std::set<GURL>& restrict_urls, | 445 const std::set<GURL>& restrict_urls, |
| 441 base::Time begin_time, | 446 base::Time begin_time, |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 | 893 |
| 889 // Publishes the history to all indexers which are registered to receive | 894 // Publishes the history to all indexers which are registered to receive |
| 890 // history data from us. Can be NULL if there are no listeners. | 895 // history data from us. Can be NULL if there are no listeners. |
| 891 scoped_ptr<HistoryPublisher> history_publisher_; | 896 scoped_ptr<HistoryPublisher> history_publisher_; |
| 892 | 897 |
| 893 #if defined(OS_ANDROID) | 898 #if defined(OS_ANDROID) |
| 894 // Used to provide the Android ContentProvider APIs. | 899 // Used to provide the Android ContentProvider APIs. |
| 895 scoped_ptr<AndroidProviderBackend> android_provider_backend_; | 900 scoped_ptr<AndroidProviderBackend> android_provider_backend_; |
| 896 #endif | 901 #endif |
| 897 | 902 |
| 903 // Used to sync typed urls |
| 904 scoped_ptr<TypedUrlSyncableService> typed_url_syncable_service_; |
| 905 |
| 898 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 906 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
| 899 }; | 907 }; |
| 900 | 908 |
| 901 } // namespace history | 909 } // namespace history |
| 902 | 910 |
| 903 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ | 911 #endif // CHROME_BROWSER_HISTORY_HISTORY_BACKEND_H_ |
| OLD | NEW |