Index: components/sync/api/attachments/attachment_service_proxy_for_test.h |
diff --git a/components/sync/api/attachments/attachment_service_proxy_for_test.h b/components/sync/api/attachments/attachment_service_proxy_for_test.h |
deleted file mode 100644 |
index be46ec17f630d733c919f2030dca9f295df61b16..0000000000000000000000000000000000000000 |
--- a/components/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 COMPONENTS_SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_ |
-#define COMPONENTS_SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_ |
- |
-#include <memory> |
- |
-#include "base/macros.h" |
-#include "base/memory/weak_ptr.h" |
-#include "components/sync/api/attachments/attachment_service_proxy.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 AttachmentServiceProxyForTest : public AttachmentServiceProxy { |
- public: |
- static AttachmentServiceProxy Create(); |
- ~AttachmentServiceProxyForTest() override; |
- |
- private: |
- // A Core that owns the wrapped AttachmentService. |
- class OwningCore : public AttachmentServiceProxy::Core { |
- public: |
- OwningCore(std::unique_ptr<AttachmentService>, |
- std::unique_ptr<base::WeakPtrFactory<AttachmentService>> |
- weak_ptr_factory); |
- |
- private: |
- ~OwningCore() override; |
- |
- std::unique_ptr<AttachmentService> wrapped_; |
- // WeakPtrFactory for wrapped_. See Create() for why this is a unique_ptr. |
- std::unique_ptr<base::WeakPtrFactory<AttachmentService>> weak_ptr_factory_; |
- |
- DISALLOW_COPY_AND_ASSIGN(OwningCore); |
- }; |
- |
- AttachmentServiceProxyForTest( |
- const scoped_refptr<base::SequencedTaskRunner>& wrapped_task_runner, |
- const scoped_refptr<Core>& core); |
-}; |
- |
-} // namespace syncer |
- |
-#endif // COMPONENTS_SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_ |