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..f3ec350f35975999d09c1424a248857258bcbd92 |
--- /dev/null |
+++ b/components/offline_pages/core/prefetch/prefetch_store.h |
@@ -0,0 +1,33 @@ |
+// 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; |
+ |
+ virtual ~PrefetchStore() = default; |
+ |
+ // 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; |
+}; |
+ |
+} // namespace offline_pages |
+ |
+#endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_STORE_H_ |