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

Unified Diff: sync/api/attachments/attachment_service_proxy_for_test.h

Issue 436373002: Move non-API code out of sync/api/attachments/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Apply CR feedback. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: sync/api/attachments/attachment_service_proxy_for_test.h
diff --git a/sync/api/attachments/attachment_service_proxy_for_test.h b/sync/api/attachments/attachment_service_proxy_for_test.h
deleted file mode 100644
index 2fb5c861e6a21a396b2740c2f0ece6cae4781e53..0000000000000000000000000000000000000000
--- a/sync/api/attachments/attachment_service_proxy_for_test.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_
-#define SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_
-
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "sync/api/attachments/attachment_service_proxy.h"
-#include "sync/base/sync_export.h"
-
-namespace syncer {
-
-// An self-contained AttachmentServiceProxy to reduce boilerplate code in tests.
-//
-// Constructs and owns an AttachmentService suitable for use in tests.
-// NOTE: This class does not require the current thread to have a MessageLoop,
-// however all methods will effectively become no-op stubs in that case.
-class SYNC_EXPORT AttachmentServiceProxyForTest
- : public AttachmentServiceProxy {
- public:
- static AttachmentServiceProxy Create();
- virtual ~AttachmentServiceProxyForTest();
-
- private:
- // A Core that owns the wrapped AttachmentService.
- class OwningCore : public AttachmentServiceProxy::Core {
- public:
- OwningCore(
- scoped_ptr<AttachmentService>,
- scoped_ptr<base::WeakPtrFactory<AttachmentService> > weak_ptr_factory);
-
- private:
- scoped_ptr<AttachmentService> wrapped_;
- // WeakPtrFactory for wrapped_. See Create() for why this is a scoped_ptr.
- scoped_ptr<base::WeakPtrFactory<AttachmentService> > weak_ptr_factory_;
-
- virtual ~OwningCore();
-
- DISALLOW_COPY_AND_ASSIGN(OwningCore);
- };
-
- AttachmentServiceProxyForTest(
- const scoped_refptr<base::SequencedTaskRunner>& wrapped_task_runner,
- const scoped_refptr<Core>& core);
-};
-
-} // namespace syncer
-
-#endif // SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_
« no previous file with comments | « sync/api/attachments/attachment_service_proxy.cc ('k') | sync/api/attachments/attachment_service_proxy_for_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698