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

Side by Side Diff: content/browser/frame_host/form_submission_throttle.h

Issue 2830353003: Tracing for NavigationHandle lifetime and state. (Closed)
Patch Set: Rebase. Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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_FORM_SUBMISSION_THROTTLE_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FORM_SUBMISSION_THROTTLE_H_
6 #define CONTENT_BROWSER_FRAME_HOST_FORM_SUBMISSION_THROTTLE_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_FORM_SUBMISSION_THROTTLE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "content/public/browser/navigation_throttle.h" 12 #include "content/public/browser/navigation_throttle.h"
13 13
14 namespace content { 14 namespace content {
15 class NavigationHandle; 15 class NavigationHandle;
16 16
17 // A FormSubmissionThrottle is responsible for enforcing the 'form-action' CSP 17 // A FormSubmissionThrottle is responsible for enforcing the 'form-action' CSP
18 // directive, blocking requests which violate them. 18 // directive, blocking requests which violate them.
19 // It is enforcing it only if PlzNavigate is enabled. Blink is still enforcing 19 // It is enforcing it only if PlzNavigate is enabled. Blink is still enforcing
20 // the 'form-action' directive on the renderer process. 20 // the 'form-action' directive on the renderer process.
21 class CONTENT_EXPORT FormSubmissionThrottle : public NavigationThrottle { 21 class CONTENT_EXPORT FormSubmissionThrottle : public NavigationThrottle {
22 public: 22 public:
23 static std::unique_ptr<NavigationThrottle> MaybeCreateThrottleFor( 23 static std::unique_ptr<NavigationThrottle> MaybeCreateThrottleFor(
24 NavigationHandle* handle); 24 NavigationHandle* handle);
25 25
26 ~FormSubmissionThrottle() override; 26 ~FormSubmissionThrottle() override;
27 27
28 NavigationThrottle::ThrottleCheckResult WillStartRequest() override; 28 NavigationThrottle::ThrottleCheckResult WillStartRequest() override;
29 NavigationThrottle::ThrottleCheckResult WillRedirectRequest() override; 29 NavigationThrottle::ThrottleCheckResult WillRedirectRequest() override;
30 const char* GetNameForLogging() override;
30 31
31 private: 32 private:
32 explicit FormSubmissionThrottle(NavigationHandle* handle); 33 explicit FormSubmissionThrottle(NavigationHandle* handle);
33 NavigationThrottle::ThrottleCheckResult CheckContentSecurityPolicyFormAction( 34 NavigationThrottle::ThrottleCheckResult CheckContentSecurityPolicyFormAction(
34 bool is_redirect); 35 bool is_redirect);
35 36
36 DISALLOW_COPY_AND_ASSIGN(FormSubmissionThrottle); 37 DISALLOW_COPY_AND_ASSIGN(FormSubmissionThrottle);
37 }; 38 };
38 39
39 } // namespace content 40 } // namespace content
40 41
41 #endif // CONTENT_BROWSER_FRAME_HOST_FORM_SUBMISSION_THROTTLE_H_ 42 #endif // CONTENT_BROWSER_FRAME_HOST_FORM_SUBMISSION_THROTTLE_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/data_url_navigation_throttle.cc ('k') | content/browser/frame_host/form_submission_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698