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

Unified Diff: components/test_runner/mock_web_document_subresource_filter.cc

Issue 2707183003: Move //components/test_runner back into //content/shell (Closed)
Patch Set: Trim DEPS Created 3 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
Index: components/test_runner/mock_web_document_subresource_filter.cc
diff --git a/components/test_runner/mock_web_document_subresource_filter.cc b/components/test_runner/mock_web_document_subresource_filter.cc
deleted file mode 100644
index c8397eec6f48b9798ee44933d04d67b2aa8cbdec..0000000000000000000000000000000000000000
--- a/components/test_runner/mock_web_document_subresource_filter.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-// 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.
-
-#include "components/test_runner/mock_web_document_subresource_filter.h"
-
-#include <algorithm>
-
-#include "base/strings/string_util.h"
-#include "third_party/WebKit/public/platform/WebURL.h"
-#include "url/gurl.h"
-
-namespace test_runner {
-
-MockWebDocumentSubresourceFilter::MockWebDocumentSubresourceFilter(
- const std::vector<std::string>& disallowed_path_suffixes)
- : disallowed_path_suffixes_(disallowed_path_suffixes) {}
-
-MockWebDocumentSubresourceFilter::~MockWebDocumentSubresourceFilter() {}
-
-blink::WebDocumentSubresourceFilter::LoadPolicy
-MockWebDocumentSubresourceFilter::getLoadPolicy(
- const blink::WebURL& resource_url,
- blink::WebURLRequest::RequestContext /* ignored */) {
- const std::string resource_path(GURL(resource_url).path());
- return std::find_if(disallowed_path_suffixes_.begin(),
- disallowed_path_suffixes_.end(),
- [&resource_path](const std::string& suffix) {
- return base::EndsWith(resource_path, suffix,
- base::CompareCase::SENSITIVE);
- }) == disallowed_path_suffixes_.end()
- ? Allow
- : Disallow;
-}
-
-void MockWebDocumentSubresourceFilter::reportDisallowedLoad() {}
-
-} // namespace test_runner

Powered by Google App Engine
This is Rietveld 408576698