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

Unified Diff: third_party/WebKit/Source/modules/fetch/CompositeDataConsumerHandle.h

Issue 2342233002: Remove Fetch[Blob|FormData]ConsumerHandle (Closed)
Patch Set: rebase Created 4 years, 3 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: third_party/WebKit/Source/modules/fetch/CompositeDataConsumerHandle.h
diff --git a/third_party/WebKit/Source/modules/fetch/CompositeDataConsumerHandle.h b/third_party/WebKit/Source/modules/fetch/CompositeDataConsumerHandle.h
deleted file mode 100644
index fb0d9bb61d118c38cfb837d506b60d93863cf863..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/modules/fetch/CompositeDataConsumerHandle.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2015 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 CompositeDataConsumerHandle_h
-#define CompositeDataConsumerHandle_h
-
-#include "modules/ModulesExport.h"
-#include "platform/heap/Handle.h"
-#include "public/platform/WebDataConsumerHandle.h"
-#include "wtf/Allocator.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/RefPtr.h"
-#include <memory>
-
-namespace blink {
-
-class WebThread;
-
-// This is a utility class to construct a composite data consumer handle. It
-// owns a web data consumer handle and delegates methods. A user can update
-// the handle by using |update| method.
-class MODULES_EXPORT CompositeDataConsumerHandle final : public WebDataConsumerHandle {
- WTF_MAKE_NONCOPYABLE(CompositeDataConsumerHandle);
- USING_FAST_MALLOC(CompositeDataConsumerHandle);
- class Context;
-public:
- // An Updater is bound to the creator thread.
- class MODULES_EXPORT Updater final : public GarbageCollectedFinalized<Updater> {
- public:
- explicit Updater(PassRefPtr<Context>);
- ~Updater();
-
- // |handle| must not be null and must not be locked.
- void update(std::unique_ptr<WebDataConsumerHandle> /* handle */);
- DEFINE_INLINE_TRACE() { }
-
- private:
- RefPtr<Context> m_context;
-#if DCHECK_IS_ON()
- WebThread* const m_thread;
-#endif
- };
-
- // Returns a handle and stores the associated updater to |*updater|. The
- // associated updater will be bound to the calling thread.
- // |handle| must not be null and must not be locked.
- template<typename T>
- static std::unique_ptr<WebDataConsumerHandle> create(std::unique_ptr<WebDataConsumerHandle> handle, T* updater)
- {
- DCHECK(handle);
- Updater* u = nullptr;
- std::unique_ptr<CompositeDataConsumerHandle> p = wrapUnique(new CompositeDataConsumerHandle(std::move(handle), &u));
- *updater = u;
- return std::move(p);
- }
- ~CompositeDataConsumerHandle() override;
-
- std::unique_ptr<Reader> obtainReader(Client*) override;
-
-private:
- class ReaderImpl;
-
- const char* debugName() const override { return "CompositeDataConsumerHandle"; }
-
- CompositeDataConsumerHandle(std::unique_ptr<WebDataConsumerHandle>, Updater**);
-
- RefPtr<Context> m_context;
-};
-
-} // namespace blink
-
-#endif // CompositeDataConsumerHandle_h

Powered by Google App Engine
This is Rietveld 408576698