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

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

Issue 642023004: Standardize usage of virtual/override/final in sync/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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_ATTACHMENT_STORE_HANDLE_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_HANDLE_H_
6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_HANDLE_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_HANDLE_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 23 matching lines...) Expand all
34 // AttachmentStoreHandle is not thread safe, it should only be accessed from 34 // AttachmentStoreHandle is not thread safe, it should only be accessed from
35 // model thread. 35 // model thread.
36 class SYNC_EXPORT AttachmentStoreHandle : public AttachmentStore, 36 class SYNC_EXPORT AttachmentStoreHandle : public AttachmentStore,
37 public base::NonThreadSafe { 37 public base::NonThreadSafe {
38 public: 38 public:
39 AttachmentStoreHandle( 39 AttachmentStoreHandle(
40 scoped_ptr<AttachmentStoreBase> backend, 40 scoped_ptr<AttachmentStoreBase> backend,
41 const scoped_refptr<base::SequencedTaskRunner>& backend_task_runner); 41 const scoped_refptr<base::SequencedTaskRunner>& backend_task_runner);
42 42
43 // AttachmentStore implementation. 43 // AttachmentStore implementation.
44 virtual void Read(const AttachmentIdList& id, 44 void Read(const AttachmentIdList& id, const ReadCallback& callback) override;
45 const ReadCallback& callback) override; 45 void Write(const AttachmentList& attachments,
46 virtual void Write(const AttachmentList& attachments, 46 const WriteCallback& callback) override;
47 const WriteCallback& callback) override; 47 void Drop(const AttachmentIdList& id, const DropCallback& callback) override;
48 virtual void Drop(const AttachmentIdList& id,
49 const DropCallback& callback) override;
50 48
51 private: 49 private:
52 virtual ~AttachmentStoreHandle(); 50 ~AttachmentStoreHandle() override;
53 51
54 // AttachmentStoreHandle controls backend's lifetime. It is safe for 52 // AttachmentStoreHandle controls backend's lifetime. It is safe for
55 // AttachmentStoreHandle to bind backend through base::Unretained for posts. 53 // AttachmentStoreHandle to bind backend through base::Unretained for posts.
56 // Backend is deleted on backend_task_runner, after that backend_ pointer is 54 // Backend is deleted on backend_task_runner, after that backend_ pointer is
57 // invalid. 55 // invalid.
58 scoped_ptr<AttachmentStoreBase> backend_; 56 scoped_ptr<AttachmentStoreBase> backend_;
59 scoped_refptr<base::SequencedTaskRunner> backend_task_runner_; 57 scoped_refptr<base::SequencedTaskRunner> backend_task_runner_;
60 58
61 DISALLOW_COPY_AND_ASSIGN(AttachmentStoreHandle); 59 DISALLOW_COPY_AND_ASSIGN(AttachmentStoreHandle);
62 }; 60 };
63 61
64 } // namespace syncer 62 } // namespace syncer
65 63
66 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_HANDLE_H_ 64 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698