| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_FRAME_HOST_ANCESTOR_THROTTLE_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_ANCESTOR_THROTTLE_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_ANCESTOR_THROTTLE_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_ANCESTOR_THROTTLE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 explicit AncestorThrottle(NavigationHandle* handle); | 42 explicit AncestorThrottle(NavigationHandle* handle); |
| 43 ~AncestorThrottle() override; | 43 ~AncestorThrottle() override; |
| 44 | 44 |
| 45 NavigationThrottle::ThrottleCheckResult WillProcessResponse() override; | 45 NavigationThrottle::ThrottleCheckResult WillProcessResponse() override; |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 FRIEND_TEST_ALL_PREFIXES(AncestorThrottleTest, ParsingXFrameOptions); | 48 FRIEND_TEST_ALL_PREFIXES(AncestorThrottleTest, ParsingXFrameOptions); |
| 49 FRIEND_TEST_ALL_PREFIXES(AncestorThrottleTest, ErrorsParsingXFrameOptions); | 49 FRIEND_TEST_ALL_PREFIXES(AncestorThrottleTest, ErrorsParsingXFrameOptions); |
| 50 FRIEND_TEST_ALL_PREFIXES(AncestorThrottleTest, | 50 FRIEND_TEST_ALL_PREFIXES(AncestorThrottleTest, |
| 51 IgnoreWhenFrameAncestorsPresent); | 51 IgnoreWhenFrameAncestorsPresent); |
| 52 FRIEND_TEST_ALL_PREFIXES(AncestorThrottleTest, IgnoreWhenAttachment); |
| 52 | 53 |
| 53 void ParseError(const std::string& value, HeaderDisposition disposition); | 54 void ParseError(const std::string& value, HeaderDisposition disposition); |
| 54 void ConsoleError(HeaderDisposition disposition); | 55 void ConsoleError(HeaderDisposition disposition); |
| 55 | 56 |
| 56 // Parses an 'X-Frame-Options' header. If the result is either CONFLICT | 57 // Parses an 'X-Frame-Options' header. If the result is either CONFLICT |
| 57 // or INVALID, |header_value| will be populated with the value which caused | 58 // or INVALID, |header_value| will be populated with the value which caused |
| 58 // the parse error. | 59 // the parse error. |
| 59 HeaderDisposition ParseHeader(const net::HttpResponseHeaders* headers, | 60 HeaderDisposition ParseHeader(const net::HttpResponseHeaders* headers, |
| 60 std::string* header_value); | 61 std::string* header_value); |
| 61 | 62 |
| 62 DISALLOW_COPY_AND_ASSIGN(AncestorThrottle); | 63 DISALLOW_COPY_AND_ASSIGN(AncestorThrottle); |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 } // namespace content | 66 } // namespace content |
| 66 | 67 |
| 67 #endif // CONTENT_BROWSER_FRAME_HOST_ANCESTOR_THROTTLE_H_ | 68 #endif // CONTENT_BROWSER_FRAME_HOST_ANCESTOR_THROTTLE_H_ |
| OLD | NEW |