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

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

Issue 575383002: Make it clear that WeakPtrFactory is the last data member (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_SERVICE_PROXY_FOR_TEST_H _ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H _
6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H _ 6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H _
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "sync/base/sync_export.h" 10 #include "sync/base/sync_export.h"
(...skipping 14 matching lines...) Expand all
25 25
26 private: 26 private:
27 // A Core that owns the wrapped AttachmentService. 27 // A Core that owns the wrapped AttachmentService.
28 class OwningCore : public AttachmentServiceProxy::Core { 28 class OwningCore : public AttachmentServiceProxy::Core {
29 public: 29 public:
30 OwningCore( 30 OwningCore(
31 scoped_ptr<AttachmentService>, 31 scoped_ptr<AttachmentService>,
32 scoped_ptr<base::WeakPtrFactory<AttachmentService> > weak_ptr_factory); 32 scoped_ptr<base::WeakPtrFactory<AttachmentService> > weak_ptr_factory);
33 33
34 private: 34 private:
35 virtual ~OwningCore();
36
35 scoped_ptr<AttachmentService> wrapped_; 37 scoped_ptr<AttachmentService> wrapped_;
36 // WeakPtrFactory for wrapped_. See Create() for why this is a scoped_ptr. 38 // WeakPtrFactory for wrapped_. See Create() for why this is a scoped_ptr.
37 scoped_ptr<base::WeakPtrFactory<AttachmentService> > weak_ptr_factory_; 39 scoped_ptr<base::WeakPtrFactory<AttachmentService> > weak_ptr_factory_;
38 40
39 virtual ~OwningCore();
40
41 DISALLOW_COPY_AND_ASSIGN(OwningCore); 41 DISALLOW_COPY_AND_ASSIGN(OwningCore);
42 }; 42 };
43 43
44 AttachmentServiceProxyForTest( 44 AttachmentServiceProxyForTest(
45 const scoped_refptr<base::SequencedTaskRunner>& wrapped_task_runner, 45 const scoped_refptr<base::SequencedTaskRunner>& wrapped_task_runner,
46 const scoped_refptr<Core>& core); 46 const scoped_refptr<Core>& core);
47 }; 47 };
48 48
49 } // namespace syncer 49 } // namespace syncer
50 50
51 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TES T_H_ 51 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TES T_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698