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

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

Issue 2401223002: [Sync] Renaming sync/api* to sync/model*. (Closed)
Patch Set: Missed a comment in a DEPS file, and rebasing. Created 4 years, 2 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: 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_

Powered by Google App Engine
This is Rietveld 408576698