OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_STORE_H_ |
| 6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_STORE_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/callback.h" |
| 11 #include "components/offline_pages/core/prefetch/prefetch_item.h" |
| 12 #include "components/offline_pages/core/prefetch/prefetch_types.h" |
| 13 |
| 14 namespace offline_pages { |
| 15 |
| 16 // Persistent storage access class for prefetching offline pages data. |
| 17 class PrefetchStore { |
| 18 public: |
| 19 typedef base::Callback<void()> CreateItemsForUniqueUrlsCallback; |
| 20 |
| 21 virtual ~PrefetchStore() = default; |
| 22 |
| 23 // Asynchronously adds URLs as new items that are not yet in the prefetch |
| 24 // store. |
| 25 virtual void CreateItemsForUniqueUrls( |
| 26 const std::string& name_space, |
| 27 const std::vector<PrefetchURL>& prefetch_urls, |
| 28 const CreateItemsForUniqueUrlsCallback& callback) = 0; |
| 29 }; |
| 30 |
| 31 } // namespace offline_pages |
| 32 |
| 33 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_STORE_H_ |
OLD | NEW |