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_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 class HistoryServiceObserver; | 66 class HistoryServiceObserver; |
67 class HistoryTest; | 67 class HistoryTest; |
68 class InMemoryHistoryBackend; | 68 class InMemoryHistoryBackend; |
69 class InMemoryURLIndex; | 69 class InMemoryURLIndex; |
70 class InMemoryURLIndexTest; | 70 class InMemoryURLIndexTest; |
71 class URLDatabase; | 71 class URLDatabase; |
72 class VisitFilter; | 72 class VisitFilter; |
73 struct DownloadRow; | 73 struct DownloadRow; |
74 struct HistoryAddPageArgs; | 74 struct HistoryAddPageArgs; |
75 struct KeywordSearchTermVisit; | 75 struct KeywordSearchTermVisit; |
76 class WebHistoryService; | |
77 | 76 |
78 } // namespace history | 77 } // namespace history |
79 | 78 |
80 // The history service records page titles, and visit times, as well as | 79 // The history service records page titles, and visit times, as well as |
81 // (eventually) information about autocomplete. | 80 // (eventually) information about autocomplete. |
82 // | 81 // |
83 // This service is thread safe. Each request callback is invoked in the | 82 // This service is thread safe. Each request callback is invoked in the |
84 // thread that made the request. | 83 // thread that made the request. |
85 class HistoryService : public syncer::SyncableService, | 84 class HistoryService : public syncer::SyncableService, |
86 public KeyedService, | 85 public KeyedService, |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 // This is the equivalent ExpireHistoryBetween() once for each element in the | 346 // This is the equivalent ExpireHistoryBetween() once for each element in the |
348 // vector. The fields of |ExpireHistoryArgs| map directly to the arguments of | 347 // vector. The fields of |ExpireHistoryArgs| map directly to the arguments of |
349 // of ExpireHistoryBetween(). | 348 // of ExpireHistoryBetween(). |
350 void ExpireHistory(const std::vector<history::ExpireHistoryArgs>& expire_list, | 349 void ExpireHistory(const std::vector<history::ExpireHistoryArgs>& expire_list, |
351 const base::Closure& callback, | 350 const base::Closure& callback, |
352 base::CancelableTaskTracker* tracker); | 351 base::CancelableTaskTracker* tracker); |
353 | 352 |
354 // Removes all visits to the given URLs in the specified time range. Calls | 353 // Removes all visits to the given URLs in the specified time range. Calls |
355 // ExpireHistoryBetween() to delete local visits, and handles deletion of | 354 // ExpireHistoryBetween() to delete local visits, and handles deletion of |
356 // synced visits if appropriate. | 355 // synced visits if appropriate. |
357 void ExpireLocalAndRemoteHistoryBetween( | 356 void ExpireLocalAndRemoteHistoryBetween(const std::set<GURL>& restrict_urls, |
358 history::WebHistoryService* web_history, | 357 base::Time begin_time, |
359 const std::set<GURL>& restrict_urls, | 358 base::Time end_time, |
360 base::Time begin_time, | 359 const base::Closure& callback, |
361 base::Time end_time, | 360 base::CancelableTaskTracker* tracker); |
362 const base::Closure& callback, | |
363 base::CancelableTaskTracker* tracker); | |
364 | 361 |
365 // Processes the given |delete_directive| and sends it to the | 362 // Processes the given |delete_directive| and sends it to the |
366 // SyncChangeProcessor (if it exists). Returns any error resulting | 363 // SyncChangeProcessor (if it exists). Returns any error resulting |
367 // from sending the delete directive to sync. | 364 // from sending the delete directive to sync. |
368 syncer::SyncError ProcessLocalDeleteDirective( | 365 syncer::SyncError ProcessLocalDeleteDirective( |
369 const sync_pb::HistoryDeleteDirectiveSpecifics& delete_directive); | 366 const sync_pb::HistoryDeleteDirectiveSpecifics& delete_directive); |
370 | 367 |
371 // Downloads ----------------------------------------------------------------- | 368 // Downloads ----------------------------------------------------------------- |
372 | 369 |
373 // Implemented by the caller of 'CreateDownload' below, and is called when the | 370 // Implemented by the caller of 'CreateDownload' below, and is called when the |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 | 836 |
840 history::DeleteDirectiveHandler delete_directive_handler_; | 837 history::DeleteDirectiveHandler delete_directive_handler_; |
841 | 838 |
842 // All vended weak pointers are invalidated in Cleanup(). | 839 // All vended weak pointers are invalidated in Cleanup(). |
843 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; | 840 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; |
844 | 841 |
845 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 842 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
846 }; | 843 }; |
847 | 844 |
848 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 845 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
OLD | NEW |