Index: components/offline_pages/core/prefetch/prefetch_test_store.h |
diff --git a/components/offline_pages/core/prefetch/prefetch_test_store.h b/components/offline_pages/core/prefetch/prefetch_test_store.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..272875b6a230fd25aab6d2e61ee6aab1d4a2f89f |
--- /dev/null |
+++ b/components/offline_pages/core/prefetch/prefetch_test_store.h |
@@ -0,0 +1,27 @@ |
+// 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_TEST_STORE_H_ |
+#define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_TEST_STORE_H_ |
+ |
+#include "components/offline_pages/core/prefetch/prefetch_store.h" |
+ |
+namespace offline_pages { |
+ |
+// A PrefetchStore implementation that keeps all stored data in memory. |
+class PrefetchTestStore : public PrefetchStore { |
+ public: |
+ PrefetchTestStore() = default; |
+ ~PrefetchTestStore() override = default; |
+ |
+ // PrefetchStore implementation. |
+ void CreateItemsForUniqueUrls( |
+ const std::string& name_space, |
+ const std::vector<PrefetchURL>& prefetch_urls, |
+ const PrefetchStore::CreateItemsForUniqueUrlsCallback& callback) override; |
+}; |
+ |
+} // namespace offline_pages |
+ |
+#endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_TEST_STORE_H_ |