OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SECURITY_XFO_THROTTLE_H_ |
| 6 #define CHROME_BROWSER_SECURITY_XFO_THROTTLE_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "content/public/browser/navigation_throttle.h" |
| 10 |
| 11 namespace content { |
| 12 class NavigationHandle; |
| 13 } |
| 14 |
| 15 namespace net { |
| 16 class HttpResponseHeaders; |
| 17 } |
| 18 |
| 19 using content::NavigationHandle; |
| 20 using content::NavigationThrottle; |
| 21 |
| 22 class XFOThrottle : public NavigationThrottle { |
| 23 public: |
| 24 explicit XFOThrottle(NavigationHandle* handle); |
| 25 ~XFOThrottle() override; |
| 26 |
| 27 NavigationThrottle::ThrottleCheckResult WillProcessResponse() override; |
| 28 static scoped_ptr<NavigationThrottle> MaybeCreateThrottleFor( |
| 29 NavigationHandle* handle); |
| 30 |
| 31 private: |
| 32 enum HeaderDisposition { |
| 33 NOT_PRESENT, |
| 34 DENY, |
| 35 SAMEORIGIN, |
| 36 ALLOWALL, |
| 37 INVALID, |
| 38 CONFLICT |
| 39 }; |
| 40 |
| 41 HeaderDisposition ParseHeader(const net::HttpResponseHeaders* headers); |
| 42 }; |
| 43 |
| 44 #endif // CHROME_BROWSER_SECURITY_XFO_THROTTLE_H_ |
OLD | NEW |