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

Unified Diff: content/browser/frame_host/ancestor_throttle.h

Issue 1988933003: Revert "Introduce AncestorThrottle, which will process 'X-Frame-Options' headers." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 7 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/error_page/common/localized_error.cc ('k') | content/browser/frame_host/ancestor_throttle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/ancestor_throttle.h
diff --git a/content/browser/frame_host/ancestor_throttle.h b/content/browser/frame_host/ancestor_throttle.h
deleted file mode 100644
index 2d13328c4608f85bfd5b1c47e4b266aa122868ea..0000000000000000000000000000000000000000
--- a/content/browser/frame_host/ancestor_throttle.h
+++ /dev/null
@@ -1,67 +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.
-
-#ifndef CONTENT_BROWSER_FRAME_HOST_ANCESTOR_THROTTLE_H_
-#define CONTENT_BROWSER_FRAME_HOST_ANCESTOR_THROTTLE_H_
-
-#include <memory>
-#include <string>
-
-#include "base/gtest_prod_util.h"
-#include "base/macros.h"
-#include "content/public/browser/navigation_throttle.h"
-
-namespace content {
-class NavigationHandle;
-}
-
-namespace net {
-class HttpResponseHeaders;
-}
-
-namespace content {
-
-// An AncestorThrottle is responsible for enforcing a resource's embedding
-// rules, and blocking requests which violate them.
-class CONTENT_EXPORT AncestorThrottle : public NavigationThrottle {
- public:
- enum class HeaderDisposition {
- NONE = 0,
- DENY,
- SAMEORIGIN,
- ALLOWALL,
- INVALID,
- CONFLICT,
- BYPASS
- };
-
- static std::unique_ptr<NavigationThrottle> MaybeCreateThrottleFor(
- NavigationHandle* handle);
-
- explicit AncestorThrottle(NavigationHandle* handle);
- ~AncestorThrottle() override;
-
- NavigationThrottle::ThrottleCheckResult WillProcessResponse() override;
-
- private:
- FRIEND_TEST_ALL_PREFIXES(AncestorThrottleTest, ParsingXFrameOptions);
- FRIEND_TEST_ALL_PREFIXES(AncestorThrottleTest, ErrorsParsingXFrameOptions);
- FRIEND_TEST_ALL_PREFIXES(AncestorThrottleTest,
- IgnoreWhenFrameAncestorsPresent);
-
- void ParseError(const std::string& value, HeaderDisposition disposition);
- void ConsoleError(HeaderDisposition disposition);
-
- // Parses an 'X-Frame-Options' header. If the result is either CONFLICT
- // or INVALID, |header_value| will be populated with the value which caused
- // the parse error.
- HeaderDisposition ParseHeader(const net::HttpResponseHeaders* headers,
- std::string* header_value);
-
- DISALLOW_COPY_AND_ASSIGN(AncestorThrottle);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_FRAME_HOST_ANCESTOR_THROTTLE_H_
« no previous file with comments | « components/error_page/common/localized_error.cc ('k') | content/browser/frame_host/ancestor_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698