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

Side by Side Diff: components/sync/core/attachments/attachment_store_frontend.h

Issue 2240613002: [Sync] Convert sync to a static library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try getting rid of sync_core source set. Created 4 years, 4 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_SYNC_CORE_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_ 5 #ifndef COMPONENTS_SYNC_CORE_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_
6 #define COMPONENTS_SYNC_CORE_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_ 6 #define COMPONENTS_SYNC_CORE_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 11 matching lines...) Expand all
22 22
23 // AttachmentStoreFrontend is helper to post AttachmentStore calls to backend on 23 // AttachmentStoreFrontend is helper to post AttachmentStore calls to backend on
24 // different thread. Backend is expected to know on which thread to post 24 // different thread. Backend is expected to know on which thread to post
25 // callbacks with results. 25 // callbacks with results.
26 // AttachmentStoreFrontend takes ownership of backend. Backend is deleted on 26 // AttachmentStoreFrontend takes ownership of backend. Backend is deleted on
27 // backend thread. 27 // backend thread.
28 // AttachmentStoreFrontend is not thread safe, it should only be accessed from 28 // AttachmentStoreFrontend is not thread safe, it should only be accessed from
29 // model thread. 29 // model thread.
30 // Method signatures of AttachmentStoreFrontend match exactly methods of 30 // Method signatures of AttachmentStoreFrontend match exactly methods of
31 // AttachmentStoreBackend. 31 // AttachmentStoreBackend.
32 class SYNC_EXPORT AttachmentStoreFrontend 32 class AttachmentStoreFrontend
33 : public base::RefCounted<AttachmentStoreFrontend>, 33 : public base::RefCounted<AttachmentStoreFrontend>,
34 public base::NonThreadSafe { 34 public base::NonThreadSafe {
35 public: 35 public:
36 AttachmentStoreFrontend( 36 AttachmentStoreFrontend(
37 std::unique_ptr<AttachmentStoreBackend> backend, 37 std::unique_ptr<AttachmentStoreBackend> backend,
38 const scoped_refptr<base::SequencedTaskRunner>& backend_task_runner); 38 const scoped_refptr<base::SequencedTaskRunner>& backend_task_runner);
39 39
40 void Init(const AttachmentStore::InitCallback& callback); 40 void Init(const AttachmentStore::InitCallback& callback);
41 41
42 void Read(AttachmentStore::Component component, 42 void Read(AttachmentStore::Component component,
(...skipping 22 matching lines...) Expand all
65 65
66 std::unique_ptr<AttachmentStoreBackend> backend_; 66 std::unique_ptr<AttachmentStoreBackend> backend_;
67 scoped_refptr<base::SequencedTaskRunner> backend_task_runner_; 67 scoped_refptr<base::SequencedTaskRunner> backend_task_runner_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(AttachmentStoreFrontend); 69 DISALLOW_COPY_AND_ASSIGN(AttachmentStoreFrontend);
70 }; 70 };
71 71
72 } // namespace syncer 72 } // namespace syncer
73 73
74 #endif // COMPONENTS_SYNC_CORE_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_ 74 #endif // COMPONENTS_SYNC_CORE_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698