| Index: components/offline_pages/offline_page_metadata_store_impl.h
|
| diff --git a/components/offline_pages/offline_page_metadata_store_impl.h b/components/offline_pages/offline_page_metadata_store_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..848b25843e5af54764e6cdcf3d82f7d6e8d6bce6
|
| --- /dev/null
|
| +++ b/components/offline_pages/offline_page_metadata_store_impl.h
|
| @@ -0,0 +1,47 @@
|
| +// Copyright 2015 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_OFFLINE_PAGE_METADATA_STORE_IMPL_H_
|
| +#define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_IMPL_H_
|
| +
|
| +#include "components/offline_pages/offline_page_metadata_store.h"
|
| +
|
| +#include "base/memory/ref_counted.h"
|
| +#include "base/memory/weak_ptr.h"
|
| +
|
| +namespace base {
|
| +class FilePath;
|
| +class SequencedTaskRunner;
|
| +}
|
| +
|
| +namespace offline_pages {
|
| +
|
| +// Implements OfflinePageMetadataStore using SQLite.
|
| +class OfflinePageMetadataStoreImpl : public OfflinePageMetadataStore {
|
| + public:
|
| + OfflinePageMetadataStoreImpl(
|
| + const base::FilePath& path,
|
| + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner);
|
| + ~OfflinePageMetadataStoreImpl() override;
|
| +
|
| + void Close();
|
| +
|
| + // OfflinePageMetadataStore implementation:
|
| + void Load(const LoadCallback& callback) override;
|
| + void AddOfflinePage(const OfflinePageItem& offline_page_record,
|
| + const UpdateCallback& callback) override;
|
| + void RemoveOfflinePage(const GURL& page_url,
|
| + const UpdateCallback& callback) override;
|
| + void Destroy(const UpdateCallback& callback) override;
|
| +
|
| + private:
|
| + class Backend;
|
| +
|
| + scoped_refptr<Backend> backend_;
|
| + scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
|
| +};
|
| +
|
| +} // namespace offline_pages
|
| +
|
| +#endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_IMPL_H_
|
|
|