Chromium Code Reviews| 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 typedef base::Callback<void(bool /* success */)> ResetCallback; | |
| 21 | |
| 22 virtual ~PrefetchStore(){}; | |
| 23 | |
| 24 // Asynchronously adds URLs as new items that are not yet in the prefetch | |
| 25 // store. | |
| 26 virtual void CreateItemsForUniqueUrls( | |
| 27 const std::string& name_space, | |
| 28 const std::vector<PrefetchURL>& prefetch_urls, | |
| 29 const CreateItemsForUniqueUrlsCallback& callback) = 0; | |
| 30 | |
| 31 // Resets the store. | |
|
Dmitry Titov
2017/05/18 21:24:02
What exactly "Resets" mean? Could you add more to
carlosk
2017/05/24 20:57:26
Even better: I'll fully remove it for now as it's
| |
| 32 virtual void Reset(const ResetCallback& callback) = 0; | |
| 33 }; | |
| 34 | |
| 35 } // namespace offline_pages | |
| 36 | |
| 37 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_STORE_H_ | |
| OLD | NEW |