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

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

Issue 1905033002: PlzNavigate: Move navigation-level mixed content checks to the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@console-security-message
Patch Set: Overall code cleanup to request reviewers to PTAL. Created 4 years, 5 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
(Empty)
1 // Copyright 2016 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_MIXED_CONTENT_NAVIGATION_THROTTLE_H_
6 #define CONTENT_BROWSER_FRAME_HOST_MIXED_CONTENT_NAVIGATION_THROTTLE_H_
7
8 #include "base/gtest_prod_util.h"
9 #include "base/macros.h"
10 #include "content/common/content_export.h"
11 #include "content/public/browser/navigation_handle.h"
12 #include "content/public/browser/navigation_throttle.h"
13
14 namespace content {
15
16 class FrameTreeNode;
17
18 using ThrottleCheckResult = NavigationThrottle::ThrottleCheckResult;
19
20 // Responsible for browser process side mixed-content security. It checks only
21 // for frame-level resource loads (aka navigation loads); fetching of
22 // sub-resources are checked in the renderer process by MixedContentChecker.
23 // Changes to this class might need to be reflected on its renderer counterpart.
24 //
25 // Current mixed content draft that drives this implementation:
26 // https://w3c.github.io/webappsec-mixed-content/
27 class MixedContentNavigationThrottle : public NavigationThrottle {
28 public:
29 MixedContentNavigationThrottle(NavigationHandle* navigation_handle);
30 ~MixedContentNavigationThrottle() override;
31
32 ThrottleCheckResult WillStartRequest() override;
33
34 ThrottleCheckResult WillRedirectRequest() override;
35
36 ThrottleCheckResult WillProcessResponse() override;
37
38 private:
39 FRIEND_TEST_ALL_PREFIXES(MixedContentNavigationThrottleTest, IsMixedContent);
40
41 // Returns the parent frame where mixed content exists for the provided data
42 // or null if there is no mixed content.
43 FrameTreeNode* InWhichFrameIsContentMixed(FrameTreeNode* node,
44 const GURL& url);
45
46 static bool CONTENT_EXPORT IsMixedContentForTesting(const GURL& origin_url,
47 const GURL& url);
48
49 DISALLOW_COPY_AND_ASSIGN(MixedContentNavigationThrottle);
50 };
51
52 } // namespace content
53
54 #endif // CONTENT_BROWSER_FRAME_HOST_MIXED_CONTENT_NAVIGATION_THROTTLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698