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

Side by Side Diff: sync/internal_api/public/attachments/in_memory_attachment_store.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_IN_MEMORY_ATTACHMENT_STORE_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_IN_MEMORY_ATTACHMENT_STORE_H_
6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_IN_MEMORY_ATTACHMENT_STORE_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_IN_MEMORY_ATTACHMENT_STORE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/threading/non_thread_safe.h" 9 #include "base/threading/non_thread_safe.h"
10 #include "sync/api/attachments/attachment.h" 10 #include "sync/api/attachments/attachment.h"
(...skipping 15 matching lines...) Expand all
26 public base::NonThreadSafe { 26 public base::NonThreadSafe {
27 public: 27 public:
28 InMemoryAttachmentStore( 28 InMemoryAttachmentStore(
29 const scoped_refptr<base::SequencedTaskRunner>& callback_task_runner); 29 const scoped_refptr<base::SequencedTaskRunner>& callback_task_runner);
30 ~InMemoryAttachmentStore() override; 30 ~InMemoryAttachmentStore() override;
31 31
32 // AttachmentStoreBackend implementation. 32 // AttachmentStoreBackend implementation.
33 void Init(const AttachmentStore::InitCallback& callback) override; 33 void Init(const AttachmentStore::InitCallback& callback) override;
34 void Read(const AttachmentIdList& ids, 34 void Read(const AttachmentIdList& ids,
35 const AttachmentStore::ReadCallback& callback) override; 35 const AttachmentStore::ReadCallback& callback) override;
36 void Write(AttachmentStore::AttachmentReferrer referrer, 36 void Write(AttachmentStore::Component component,
37 const AttachmentList& attachments, 37 const AttachmentList& attachments,
38 const AttachmentStore::WriteCallback& callback) override; 38 const AttachmentStore::WriteCallback& callback) override;
39 void Drop(AttachmentStore::AttachmentReferrer referrer, 39 void SetReference(AttachmentStore::Component component,
40 const AttachmentIdList& ids, 40 const AttachmentIdList& ids) override;
41 const AttachmentStore::DropCallback& callback) override; 41 void DropReference(AttachmentStore::Component component,
42 const AttachmentIdList& ids,
43 const AttachmentStore::DropCallback& callback) override;
42 void ReadMetadata( 44 void ReadMetadata(
43 const AttachmentIdList& ids, 45 const AttachmentIdList& ids,
44 const AttachmentStore::ReadMetadataCallback& callback) override; 46 const AttachmentStore::ReadMetadataCallback& callback) override;
45 void ReadAllMetadata( 47 void ReadAllMetadata(
46 AttachmentStore::AttachmentReferrer referrer, 48 AttachmentStore::Component component,
47 const AttachmentStore::ReadMetadataCallback& callback) override; 49 const AttachmentStore::ReadMetadataCallback& callback) override;
48 50
49 private: 51 private:
50 AttachmentMap attachments_; 52 AttachmentMap attachments_;
51 53
52 DISALLOW_COPY_AND_ASSIGN(InMemoryAttachmentStore); 54 DISALLOW_COPY_AND_ASSIGN(InMemoryAttachmentStore);
53 }; 55 };
54 56
55 } // namespace syncer 57 } // namespace syncer
56 58
57 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_IN_MEMORY_ATTACHMENT_STORE_H_ 59 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_IN_MEMORY_ATTACHMENT_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698