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

Side by Side Diff: sync/api/attachments/attachment_service_proxy_for_test.h

Issue 213003004: Replace calls to 3-arg SyncData::CreateLocalData with 5-arg version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@syncapi
Patch Set: Merge with master. Created 6 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_
6 #define SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h"
10 #include "sync/api/attachments/attachment_service_proxy.h"
11 #include "sync/base/sync_export.h"
12
13 namespace syncer {
14
15 // Helper class to implement "base from member" idiom.
16 //
17 // Logically private to AttachmentServiceProxyForTest.
18 class SYNC_EXPORT AttachmentServiceProxyForTestMember {
19 protected:
20 scoped_ptr<AttachmentService> wrapped_;
21 base::WeakPtrFactory<AttachmentService> wrapped_weak_ptr_factory_;
22 explicit AttachmentServiceProxyForTestMember(
23 scoped_ptr<AttachmentService> wrapped);
24 virtual ~AttachmentServiceProxyForTestMember();
25 };
26
27 // An AttachmentServiceProxy to reduce boilerplate code in tests.
28 //
29 // Constructs and owns an AttachmentService suitable for use in tests. Assumes
30 // the current thread has a MessageLoop.
31 class SYNC_EXPORT AttachmentServiceProxyForTest
32 : private AttachmentServiceProxyForTestMember,
33 public AttachmentServiceProxy {
34 public:
35 // Default copy and assignment are welcome.
36 AttachmentServiceProxyForTest();
37 virtual ~AttachmentServiceProxyForTest();
38 };
39
40 } // namespace syncer
41
42 #endif // SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698