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

Unified Diff: components/test_runner/mock_web_document_subresource_filter.h

Issue 2022783002: Skeleton of the Safe Browsing Subresource Filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implement RenderFrameObserver::OnDestruct introduced by rebase. Created 4 years, 6 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/test_runner/BUILD.gn ('k') | components/test_runner/mock_web_document_subresource_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/mock_web_document_subresource_filter.h
diff --git a/components/test_runner/mock_web_document_subresource_filter.h b/components/test_runner/mock_web_document_subresource_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..22c9f363b0d7a1fac641aef583b40cad7096cd32
--- /dev/null
+++ b/components/test_runner/mock_web_document_subresource_filter.h
@@ -0,0 +1,40 @@
+// Copyright 2016 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_TEST_RUNNER_MOCK_WEB_DOCUMENT_SUBRESOURCE_FILTER_H_
+#define COMPONENTS_TEST_RUNNER_MOCK_WEB_DOCUMENT_SUBRESOURCE_FILTER_H_
+
+#include <string>
+#include <vector>
+
+#include "base/macros.h"
+#include "third_party/WebKit/public/platform/WebDocumentSubresourceFilter.h"
+#include "third_party/WebKit/public/platform/WebURLRequest.h"
+
+namespace blink {
+class WebURL;
+} // namespace blink
+
+namespace test_runner {
+
+class MockWebDocumentSubresourceFilter
+ : public blink::WebDocumentSubresourceFilter {
+ public:
+ explicit MockWebDocumentSubresourceFilter(
+ const std::vector<std::string>& disallowed_path_suffixes);
+ ~MockWebDocumentSubresourceFilter() override;
+
+ // blink::WebDocumentSubresourceFilter:
+ bool allowLoad(const blink::WebURL& resource_url,
+ blink::WebURLRequest::RequestContext) override;
+
+ private:
+ std::vector<std::string> disallowed_path_suffixes_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockWebDocumentSubresourceFilter);
+};
+
+} // namespace test_runner
+
+#endif // COMPONENTS_TEST_RUNNER_MOCK_WEB_DOCUMENT_SUBRESOURCE_FILTER_H_
« no previous file with comments | « components/test_runner/BUILD.gn ('k') | components/test_runner/mock_web_document_subresource_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698