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

Side by Side Diff: chrome/browser/security/xfo_throttle.h

Issue 1530393003: WIP: Move 'X-Frame-Options' checking to the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years 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 unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698