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

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

Issue 1694863003: Refactor the offline page storage to include client namespace and id. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments. Created 4 years, 10 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_IMPL_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_IMPL_H_
6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_IMPL_H_ 6 #define COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 23 matching lines...) Expand all
34 public: 34 public:
35 OfflinePageMetadataStoreImpl( 35 OfflinePageMetadataStoreImpl(
36 scoped_refptr<base::SequencedTaskRunner> background_task_runner, 36 scoped_refptr<base::SequencedTaskRunner> background_task_runner,
37 const base::FilePath& database_dir); 37 const base::FilePath& database_dir);
38 ~OfflinePageMetadataStoreImpl() override; 38 ~OfflinePageMetadataStoreImpl() override;
39 39
40 // OfflinePageMetadataStore implementation: 40 // OfflinePageMetadataStore implementation:
41 void Load(const LoadCallback& callback) override; 41 void Load(const LoadCallback& callback) override;
42 void AddOrUpdateOfflinePage(const OfflinePageItem& offline_page_record, 42 void AddOrUpdateOfflinePage(const OfflinePageItem& offline_page_record,
43 const UpdateCallback& callback) override; 43 const UpdateCallback& callback) override;
44 void RemoveOfflinePages(const std::vector<int64_t>& bookmark_ids, 44 void RemoveOfflinePages(const std::vector<int64_t>& offline_ids,
45 const UpdateCallback& callback) override; 45 const UpdateCallback& callback) override;
46 void Reset(const ResetCallback& callback) override; 46 void Reset(const ResetCallback& callback) override;
47 47
48 private: 48 private:
49 void LoadContinuation(const LoadCallback& callback, bool success); 49 void LoadContinuation(const LoadCallback& callback, bool success);
50 void LoadDone(const LoadCallback& callback, 50 void LoadDone(const LoadCallback& callback,
51 bool success, 51 bool success,
52 scoped_ptr<std::vector<OfflinePageEntry>> entries); 52 scoped_ptr<std::vector<OfflinePageEntry>> entries);
53 void NotifyLoadResult(const LoadCallback& callback, 53 void NotifyLoadResult(const LoadCallback& callback,
54 LoadStatus status, 54 LoadStatus status,
(...skipping 15 matching lines...) Expand all
70 scoped_ptr<leveldb_proto::ProtoDatabase<OfflinePageEntry>> database_; 70 scoped_ptr<leveldb_proto::ProtoDatabase<OfflinePageEntry>> database_;
71 71
72 base::WeakPtrFactory<OfflinePageMetadataStoreImpl> weak_ptr_factory_; 72 base::WeakPtrFactory<OfflinePageMetadataStoreImpl> weak_ptr_factory_;
73 73
74 DISALLOW_COPY_AND_ASSIGN(OfflinePageMetadataStoreImpl); 74 DISALLOW_COPY_AND_ASSIGN(OfflinePageMetadataStoreImpl);
75 }; 75 };
76 76
77 } // namespace offline_pages 77 } // namespace offline_pages
78 78
79 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_IMPL_H_ 79 #endif // COMPONENTS_OFFLINE_PAGES_OFFLINE_PAGE_METADATA_STORE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698