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