Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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 CONTENT_BROWSER_FRAME_HOST_FORM_SUBMISSION_THROTTLE_H_ | |
| 6 #define CONTENT_BROWSER_FRAME_HOST_FORM_SUBMISSION_THROTTLE_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/macros.h" | |
| 12 #include "content/public/browser/navigation_throttle.h" | |
| 13 | |
| 14 namespace content { | |
| 15 class NavigationHandle; | |
| 16 | |
| 17 // A FormSubmittionThrottle is responsible for enforcing the 'form-action' CSP, | |
|
alexmos
2017/02/28 02:48:46
nit: s/CSP/CSP directive/
arthursonzogni
2017/03/07 16:25:51
Done.
| |
| 18 // blocking requests which violate them. | |
|
alexmos
2017/02/28 02:48:46
Like frame-src, I'd document that this is currentl
Mike West
2017/03/02 10:45:34
That kind of explicit carveout makes sense to me,
arthursonzogni
2017/03/07 16:25:51
Done.
Mike West
2017/03/09 08:20:04
I think it is, for the same reasons that we did so
arthursonzogni
2017/03/10 09:35:37
I tried, every layout tests are working with two e
| |
| 19 class CONTENT_EXPORT FormSubmissionThrottle : public NavigationThrottle { | |
| 20 public: | |
| 21 static std::unique_ptr<NavigationThrottle> MaybeCreateThrottleFor( | |
| 22 NavigationHandle* handle); | |
| 23 | |
| 24 ~FormSubmissionThrottle() override; | |
| 25 | |
| 26 NavigationThrottle::ThrottleCheckResult WillStartRequest() override; | |
| 27 NavigationThrottle::ThrottleCheckResult WillRedirectRequest() override; | |
| 28 | |
| 29 private: | |
| 30 explicit FormSubmissionThrottle(NavigationHandle* handle); | |
| 31 NavigationThrottle::ThrottleCheckResult CheckContentSecurityPolicyFormAction( | |
| 32 bool is_redirect); | |
| 33 | |
| 34 DISALLOW_COPY_AND_ASSIGN(FormSubmissionThrottle); | |
| 35 }; | |
| 36 | |
| 37 } // namespace content | |
| 38 | |
| 39 #endif // CONTENT_BROWSER_FRAME_HOST_FORM_SUBMISSION_THROTTLE_H_ | |
| OLD | NEW |