| Index: components/precache/content/precache_manager.h
|
| diff --git a/components/precache/content/precache_manager.h b/components/precache/content/precache_manager.h
|
| index dde145a3040f74b5c32b115d0b4c88ef79d926d9..6cbaf7a858ab8dadc5a77f2369f9894e95c9235c 100644
|
| --- a/components/precache/content/precache_manager.h
|
| +++ b/components/precache/content/precache_manager.h
|
| @@ -61,7 +61,9 @@ class PrecacheManager : public KeyedService,
|
|
|
| PrecacheManager(content::BrowserContext* browser_context,
|
| const sync_driver::SyncService* const sync_service,
|
| - const history::HistoryService* const history_service);
|
| + const history::HistoryService* const history_service,
|
| + std::unique_ptr<PrecacheDatabase> precache_database,
|
| + const base::FilePath& db_path);
|
| ~PrecacheManager() override;
|
|
|
| // Returns true if the client is in the experiment group -- that is,
|
| @@ -117,9 +119,16 @@ class PrecacheManager : public KeyedService,
|
| // From PrecacheFetcher::PrecacheDelegate.
|
| void OnDone() override;
|
|
|
| + // Callback when fetching unfinished work from storage is done.
|
| + void OnGetUnfinishedWorkDone(
|
| + std::unique_ptr<PrecacheUnfinishedWork> unfinished_work);
|
| +
|
| // From history::HistoryService::TopHosts.
|
| void OnHostsReceived(const history::TopHostsList& host_counts);
|
|
|
| + // Initializes and Starts a PrecacheFetcher with unfinished work.
|
| + void InitializeAndStartFetcher();
|
| +
|
| // From history::HistoryService::TopHosts. Used for the control group, which
|
| // gets the list of TopHosts for metrics purposes, but otherwise does nothing.
|
| void OnHostsReceivedThenDone(const history::TopHostsList& host_counts);
|
| @@ -162,6 +171,9 @@ class PrecacheManager : public KeyedService,
|
| // Flag indicating whether or not precaching is currently in progress.
|
| bool is_precaching_;
|
|
|
| + // Work that hasn't yet finished.
|
| + std::unique_ptr<PrecacheUnfinishedWork> unfinished_work_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(PrecacheManager);
|
| };
|
|
|
|
|