OLD | NEW |
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_MIXED_CONTENT_NAVIGATION_THROTTLE_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_MIXED_CONTENT_NAVIGATION_THROTTLE_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_MIXED_CONTENT_NAVIGATION_THROTTLE_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_MIXED_CONTENT_NAVIGATION_THROTTLE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/public/browser/navigation_handle.h" | 13 #include "content/public/browser/navigation_handle.h" |
14 #include "content/public/browser/navigation_throttle.h" | 14 #include "content/public/browser/navigation_throttle.h" |
15 #include "content/public/common/request_context_type.h" | 15 #include "content/public/common/request_context_type.h" |
16 #include "third_party/WebKit/public/platform/WebMixedContentContextType.h" | 16 #include "third_party/WebKit/public/platform/WebMixedContentContextType.h" |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 class FrameTreeNode; | 20 class FrameTreeNode; |
21 struct WebPreferences; | 21 struct WebPreferences; |
22 | 22 |
23 using ThrottleCheckResult = NavigationThrottle::ThrottleCheckResult; | |
24 | |
25 // Responsible for browser-process-side mixed content security checks. It is | 23 // Responsible for browser-process-side mixed content security checks. It is |
26 // only enabled if PlzNavigate is and checks only for frame-level resource loads | 24 // only enabled if PlzNavigate is and checks only for frame-level resource loads |
27 // (aka navigation loads). Sub-resources fetches are checked in the renderer | 25 // (aka navigation loads). Sub-resources fetches are checked in the renderer |
28 // process by MixedContentChecker. Changes to this class might need to be | 26 // process by MixedContentChecker. Changes to this class might need to be |
29 // reflected on its renderer counterpart. | 27 // reflected on its renderer counterpart. |
30 // | 28 // |
31 // Current mixed content W3C draft that drives this implementation: | 29 // Current mixed content W3C draft that drives this implementation: |
32 // https://w3c.github.io/webappsec-mixed-content/ | 30 // https://w3c.github.io/webappsec-mixed-content/ |
33 // | 31 // |
34 // TODO(carlosk): For HSTS to work properly in PlzNavigate when these browser | 32 // TODO(carlosk): For HSTS to work properly in PlzNavigate when these browser |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // values are reported to the respective renderer process after each mixed | 87 // values are reported to the respective renderer process after each mixed |
90 // content check is finished. | 88 // content check is finished. |
91 std::set<int> mixed_content_features_; | 89 std::set<int> mixed_content_features_; |
92 | 90 |
93 DISALLOW_COPY_AND_ASSIGN(MixedContentNavigationThrottle); | 91 DISALLOW_COPY_AND_ASSIGN(MixedContentNavigationThrottle); |
94 }; | 92 }; |
95 | 93 |
96 } // namespace content | 94 } // namespace content |
97 | 95 |
98 #endif // CONTENT_BROWSER_FRAME_HOST_MIXED_CONTENT_NAVIGATION_THROTTLE_H_ | 96 #endif // CONTENT_BROWSER_FRAME_HOST_MIXED_CONTENT_NAVIGATION_THROTTLE_H_ |
OLD | NEW |