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

Side by Side Diff: content/common/content_security_policy/content_security_policy.h

Issue 2910573002: Implement upgrade-insecure-requests in browser for frame requests (Closed)
Patch Set: rebase Created 3 years, 6 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_COMMON_CONTENT_SECURITY_POLICY_CONTENT_SECURITY_POLICY_H_ 5 #ifndef CONTENT_COMMON_CONTENT_SECURITY_POLICY_CONTENT_SECURITY_POLICY_H_
6 #define CONTENT_COMMON_CONTENT_SECURITY_POLICY_CONTENT_SECURITY_POLICY_H_ 6 #define CONTENT_COMMON_CONTENT_SECURITY_POLICY_CONTENT_SECURITY_POLICY_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 27 matching lines...) Expand all
38 38
39 // Return true when the |policy| allows a request to the |url| in relation to 39 // Return true when the |policy| allows a request to the |url| in relation to
40 // the |directive| for a given |context|. 40 // the |directive| for a given |context|.
41 // Note: Any policy violation are reported to the |context|. 41 // Note: Any policy violation are reported to the |context|.
42 static bool Allow(const ContentSecurityPolicy& policy, 42 static bool Allow(const ContentSecurityPolicy& policy,
43 CSPDirective::Name directive, 43 CSPDirective::Name directive,
44 const GURL& url, 44 const GURL& url,
45 bool is_redirect, 45 bool is_redirect,
46 CSPContext* context, 46 CSPContext* context,
47 const SourceLocation& source_location); 47 const SourceLocation& source_location);
48
49 // Returns true if |policy| specifies that an insecure HTTP request should be
50 // upgraded to HTTPS.
51 static bool ShouldUpgradeInsecureRequest(const ContentSecurityPolicy& policy);
48 }; 52 };
49 53
50 } // namespace content 54 } // namespace content
51 #endif // CONTENT_COMMON_CONTENT_SECURITY_POLICY_CONTENT_SECURITY_POLICY_H_ 55 #endif // CONTENT_COMMON_CONTENT_SECURITY_POLICY_CONTENT_SECURITY_POLICY_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_request.cc ('k') | content/common/content_security_policy/content_security_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698