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

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

Issue 254713003: sync: don't require a MessageLoopProxy in AttachmentServiceProxyForTest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sync/api/attachments/attachment_service_proxy_for_test.cc » ('j') | 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_API_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_ 5 #ifndef SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_
6 #define SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_ 6 #define SYNC_API_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/api/attachments/attachment_service_proxy.h" 10 #include "sync/api/attachments/attachment_service_proxy.h"
11 #include "sync/base/sync_export.h" 11 #include "sync/base/sync_export.h"
12 12
13 namespace syncer { 13 namespace syncer {
14 14
15 // An self-contained AttachmentServiceProxy to reduce boilerplate code in tests. 15 // An self-contained AttachmentServiceProxy to reduce boilerplate code in tests.
16 // 16 //
17 // Constructs and owns an AttachmentService suitable for use in tests. Assumes 17 // Constructs and owns an AttachmentService suitable for use in tests.
18 // the current thread has a MessageLoop. 18 // NOTE: This class does not require the current thread to have a MessageLoop,
19 // however all methods will effectively become no-op stubs in that case.
19 class SYNC_EXPORT AttachmentServiceProxyForTest 20 class SYNC_EXPORT AttachmentServiceProxyForTest
20 : public AttachmentServiceProxy { 21 : public AttachmentServiceProxy {
21 public: 22 public:
22 static AttachmentServiceProxy Create(); 23 static AttachmentServiceProxy Create();
23 virtual ~AttachmentServiceProxyForTest(); 24 virtual ~AttachmentServiceProxyForTest();
24 25
25 private: 26 private:
26 // A Core that owns the wrapped AttachmentService. 27 // A Core that owns the wrapped AttachmentService.
27 class OwningCore : public AttachmentServiceProxy::Core { 28 class OwningCore : public AttachmentServiceProxy::Core {
28 public: 29 public:
(...skipping 12 matching lines...) Expand all
41 }; 42 };
42 43
43 AttachmentServiceProxyForTest( 44 AttachmentServiceProxyForTest(
44 const scoped_refptr<base::SequencedTaskRunner>& wrapped_task_runner, 45 const scoped_refptr<base::SequencedTaskRunner>& wrapped_task_runner,
45 const scoped_refptr<Core>& core); 46 const scoped_refptr<Core>& core);
46 }; 47 };
47 48
48 } // namespace syncer 49 } // namespace syncer
49 50
50 #endif // SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_ 51 #endif // SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_
OLDNEW
« no previous file with comments | « no previous file | sync/api/attachments/attachment_service_proxy_for_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698