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

Side by Side Diff: sync/internal_api/public/attachments/attachment_store_frontend.h

Issue 1002263005: [Sync] Introduce AttachmentStoreForSync class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 9 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 SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_
6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/threading/non_thread_safe.h" 10 #include "base/threading/non_thread_safe.h"
(...skipping 22 matching lines...) Expand all
33 public: 33 public:
34 AttachmentStoreFrontend( 34 AttachmentStoreFrontend(
35 scoped_ptr<AttachmentStoreBackend> backend, 35 scoped_ptr<AttachmentStoreBackend> backend,
36 const scoped_refptr<base::SequencedTaskRunner>& backend_task_runner); 36 const scoped_refptr<base::SequencedTaskRunner>& backend_task_runner);
37 37
38 void Init(const AttachmentStore::InitCallback& callback); 38 void Init(const AttachmentStore::InitCallback& callback);
39 39
40 void Read(const AttachmentIdList& ids, 40 void Read(const AttachmentIdList& ids,
41 const AttachmentStore::ReadCallback& callback); 41 const AttachmentStore::ReadCallback& callback);
42 42
43 void Write(AttachmentStore::AttachmentReferrer referrer, 43 void Write(AttachmentStore::Component component,
44 const AttachmentList& attachments, 44 const AttachmentList& attachments,
45 const AttachmentStore::WriteCallback& callback); 45 const AttachmentStore::WriteCallback& callback);
46 46 void SetReference(AttachmentStore::Component component,
47 void Drop(AttachmentStore::AttachmentReferrer referrer, 47 const AttachmentIdList& ids);
48 const AttachmentIdList& ids, 48 void DropReference(AttachmentStore::Component component,
49 const AttachmentStore::DropCallback& callback); 49 const AttachmentIdList& ids,
50 const AttachmentStore::DropCallback& callback);
50 51
51 void ReadMetadata(const AttachmentIdList& ids, 52 void ReadMetadata(const AttachmentIdList& ids,
52 const AttachmentStore::ReadMetadataCallback& callback); 53 const AttachmentStore::ReadMetadataCallback& callback);
53 54
54 void ReadAllMetadata(AttachmentStore::AttachmentReferrer referrer, 55 void ReadAllMetadata(AttachmentStore::Component component,
55 const AttachmentStore::ReadMetadataCallback& callback); 56 const AttachmentStore::ReadMetadataCallback& callback);
56 57
57 private: 58 private:
58 friend class base::RefCounted<AttachmentStoreFrontend>; 59 friend class base::RefCounted<AttachmentStoreFrontend>;
59 virtual ~AttachmentStoreFrontend(); 60 virtual ~AttachmentStoreFrontend();
60 61
61 scoped_ptr<AttachmentStoreBackend> backend_; 62 scoped_ptr<AttachmentStoreBackend> backend_;
62 scoped_refptr<base::SequencedTaskRunner> backend_task_runner_; 63 scoped_refptr<base::SequencedTaskRunner> backend_task_runner_;
63 64
64 DISALLOW_COPY_AND_ASSIGN(AttachmentStoreFrontend); 65 DISALLOW_COPY_AND_ASSIGN(AttachmentStoreFrontend);
65 }; 66 };
66 67
67 } // namespace syncer 68 } // namespace syncer
68 69
69 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_ 70 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698