OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_HISTORY_REPORT_DATA_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_ANDROID_HISTORY_REPORT_DATA_PROVIDER_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/task/cancelable_task_tracker.h" |
| 12 |
| 13 class Profile; |
| 14 |
| 15 namespace history { |
| 16 class HistoryService; |
| 17 } |
| 18 |
| 19 namespace bookmarks { |
| 20 class BookmarkModel; |
| 21 } |
| 22 |
| 23 namespace history_report { |
| 24 |
| 25 class DeltaFileEntryWithData; |
| 26 class DeltaFileService; |
| 27 class UsageReportsBufferService; |
| 28 |
| 29 // Provides data from History and Bookmark backends. |
| 30 class DataProvider { |
| 31 public: |
| 32 DataProvider(Profile* profile, |
| 33 DeltaFileService* delta_file_service, |
| 34 bookmarks::BookmarkModel* bookmark_model); |
| 35 ~DataProvider(); |
| 36 |
| 37 // Provides up to limit delta file entries with sequence number > last_seq_no. |
| 38 scoped_ptr<std::vector<DeltaFileEntryWithData> > Query(int64 last_seq_no, |
| 39 int32 limit); |
| 40 void StartVisitMigrationToUsageBuffer( |
| 41 UsageReportsBufferService* buffer_service); |
| 42 |
| 43 private: |
| 44 void RecreateLog(); |
| 45 |
| 46 history::HistoryService* history_service_; |
| 47 bookmarks::BookmarkModel* bookmark_model_; |
| 48 DeltaFileService* delta_file_service_; |
| 49 base::CancelableTaskTracker history_task_tracker_; |
| 50 |
| 51 DISALLOW_COPY_AND_ASSIGN(DataProvider); |
| 52 }; |
| 53 |
| 54 } // namespace history_report |
| 55 |
| 56 #endif // CHROME_BROWSER_ANDROID_HISTORY_REPORT_DATA_PROVIDER_H_ |
OLD | NEW |