Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: components/offline_pages/offline_page_metadata_store_impl.h

Issue 1160283003: [Offline] Creates metadata store interface for offline pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@offline-pages-1
Patch Set: Adding BUILD.gn updates Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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_OFFLINE_PAGE_METADATA_STORE_IMPL_H_
6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_IMPL_H_
7
8 #include "components/offline_pages/offline_page_metadata_store.h"
9
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/weak_ptr.h"
12
13 namespace base {
14 class FilePath;
15 class SequencedTaskRunner;
16 }
17
18 namespace offline_pages {
19
20 // Implements OfflinePageMetadataStore using SQLite.
21 class OfflinePageMetadataStoreImpl : public OfflinePageMetadataStore {
22 public:
23 OfflinePageMetadataStoreImpl(
24 const base::FilePath& path,
25 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner);
26 ~OfflinePageMetadataStoreImpl() override;
27
28 void Close();
29
30 // OfflinePageMetadataStore implementation:
31 void Load(const LoadCallback& callback) override;
32 void AddOfflinePage(const OfflinePageItem& offline_page_record,
33 const UpdateCallback& callback) override;
34 void RemoveOfflinePage(const GURL& page_url,
35 const UpdateCallback& callback) override;
36 void Destroy(const UpdateCallback& callback) override;
37
38 private:
39 class Backend;
40
41 scoped_refptr<Backend> backend_;
42 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
43 };
44
45 } // namespace offline_pages
46
47 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698