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

Unified Diff: components/html_viewer/mock_web_blob_registry_impl.h

Issue 1677293002: Bye bye Mandoline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moar Created 4 years, 10 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
« no previous file with comments | « components/html_viewer/media_factory.cc ('k') | components/html_viewer/mock_web_blob_registry_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/mock_web_blob_registry_impl.h
diff --git a/components/html_viewer/mock_web_blob_registry_impl.h b/components/html_viewer/mock_web_blob_registry_impl.h
deleted file mode 100644
index efc96cbba8ca83d101786b55e891248d3d0c9382..0000000000000000000000000000000000000000
--- a/components/html_viewer/mock_web_blob_registry_impl.h
+++ /dev/null
@@ -1,67 +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 COMPONENTS_HTML_VIEWER_MOCK_WEB_BLOB_REGISTRY_IMPL_H_
-#define COMPONENTS_HTML_VIEWER_MOCK_WEB_BLOB_REGISTRY_IMPL_H_
-
-#include <stddef.h>
-
-#include <map>
-
-#include "base/containers/scoped_ptr_hash_map.h"
-#include "base/macros.h"
-#include "base/memory/scoped_vector.h"
-#include "third_party/WebKit/public/platform/WebBlobData.h"
-#include "third_party/WebKit/public/platform/WebBlobRegistry.h"
-#include "third_party/WebKit/public/platform/WebVector.h"
-
-namespace html_viewer {
-
-// TODO(erg): For now, this is a just a copy of content's testing
-// mock. Eventually, this should be turned into a real implementation, but this
-// at least lets us get github working.
-class MockWebBlobRegistryImpl : public blink::WebBlobRegistry {
- public:
- MockWebBlobRegistryImpl();
- ~MockWebBlobRegistryImpl() override;
-
- void registerBlobData(const blink::WebString& uuid,
- const blink::WebBlobData& data) override;
- void addBlobDataRef(const blink::WebString& uuid) override;
- void removeBlobDataRef(const blink::WebString& uuid) override;
- void registerPublicBlobURL(const blink::WebURL&,
- const blink::WebString& uuid) override;
- void revokePublicBlobURL(const blink::WebURL&) override;
-
- // Additional support for Streams.
- void registerStreamURL(const blink::WebURL& url,
- const blink::WebString& content_type) override;
- void registerStreamURL(const blink::WebURL& url,
- const blink::WebURL& src_url) override;
- void addDataToStream(const blink::WebURL& url,
- const char* data,
- size_t length) override;
- void flushStream(const blink::WebURL& url) override;
- void finalizeStream(const blink::WebURL& url) override;
- void abortStream(const blink::WebURL& url) override;
- void unregisterStreamURL(const blink::WebURL& url) override;
-
- bool GetUUIDForURL(const blink::WebURL& url, blink::WebString* uuid) const;
- bool GetBlobItems(const blink::WebString& uuid,
- blink::WebVector<blink::WebBlobData::Item*>* items) const;
-
- private:
- base::ScopedPtrHashMap<std::string,
- scoped_ptr<ScopedVector<blink::WebBlobData::Item>>>
- blob_data_items_map_;
- std::map<std::string, int> blob_ref_count_map_;
-
- std::map<std::string, blink::WebString> public_url_to_uuid_;
-
- DISALLOW_COPY_AND_ASSIGN(MockWebBlobRegistryImpl);
-};
-
-} // namespace html_viewer
-
-#endif // COMPONENTS_HTML_VIEWER_MOCK_WEB_BLOB_REGISTRY_IMPL_H_
« no previous file with comments | « components/html_viewer/media_factory.cc ('k') | components/html_viewer/mock_web_blob_registry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698