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

Unified Diff: sync/internal_api/public/attachments/attachment_service_proxy_for_test.h

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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/internal_api/public/attachments/attachment_service_proxy_for_test.h
diff --git a/sync/internal_api/public/attachments/attachment_service_proxy_for_test.h b/sync/internal_api/public/attachments/attachment_service_proxy_for_test.h
deleted file mode 100644
index 54e2c960fece03f2ae6316dbf33f9afeb7b91931..0000000000000000000000000000000000000000
--- a/sync/internal_api/public/attachments/attachment_service_proxy_for_test.h
+++ /dev/null
@@ -1,53 +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_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_
-#define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_
-
-#include <memory>
-
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#include "sync/base/sync_export.h"
-#include "sync/internal_api/public/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 SYNC_EXPORT 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 // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_

Powered by Google App Engine
This is Rietveld 408576698