Chromium Code Reviews| Index: components/offline_pages/core/prefetch/prefetch_store.h |
| diff --git a/components/offline_pages/core/prefetch/prefetch_store.h b/components/offline_pages/core/prefetch/prefetch_store.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..714be45a9c3ea21726460c83a0a8cac109c4fc69 |
| --- /dev/null |
| +++ b/components/offline_pages/core/prefetch/prefetch_store.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2017 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 COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_STORE_H_ |
| +#define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_STORE_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/callback.h" |
| +#include "components/offline_pages/core/prefetch/prefetch_item.h" |
| +#include "components/offline_pages/core/prefetch/prefetch_types.h" |
| + |
| +namespace offline_pages { |
| + |
| +// Persistent storage access class for prefetching offline pages data. |
| +class PrefetchStore { |
| + public: |
| + typedef base::Callback<void()> CreateItemsForUniqueUrlsCallback; |
| + typedef base::Callback<void(bool /* success */)> ResetCallback; |
| + |
| + virtual ~PrefetchStore(){}; |
| + |
| + // Asynchronously adds URLs as new items that are not yet in the prefetch |
| + // store. |
| + virtual void CreateItemsForUniqueUrls( |
| + const std::string& name_space, |
| + const std::vector<PrefetchURL>& prefetch_urls, |
| + const CreateItemsForUniqueUrlsCallback& callback) = 0; |
| + |
| + // 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
|
| + virtual void Reset(const ResetCallback& callback) = 0; |
| +}; |
| + |
| +} // namespace offline_pages |
| + |
| +#endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_STORE_H_ |