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

Side by Side Diff: third_party/WebKit/Source/core/loader/MixedContentChecker.h

Issue 2002943002: CSP violation reports should report the pre-redirect URL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 DISALLOW_NEW(); 52 DISALLOW_NEW();
53 public: 53 public:
54 enum ContextType { 54 enum ContextType {
55 ContextTypeNotMixedContent, 55 ContextTypeNotMixedContent,
56 ContextTypeBlockable, 56 ContextTypeBlockable,
57 ContextTypeOptionallyBlockable, 57 ContextTypeOptionallyBlockable,
58 ContextTypeShouldBeBlockable, 58 ContextTypeShouldBeBlockable,
59 }; 59 };
60 60
61 enum ReportingStatus { SendReport, SuppressReport }; 61 enum ReportingStatus { SendReport, SuppressReport };
62 static bool shouldBlockFetch(LocalFrame*, WebURLRequest::RequestContext, Web URLRequest::FrameType, const KURL&, ReportingStatus = SendReport); 62 static bool shouldBlockFetch(LocalFrame*, WebURLRequest::RequestContext, Web URLRequest::FrameType, ResourceRequest::RedirectStatus, const KURL&, ReportingSt atus = SendReport);
63 static bool shouldBlockFetch(LocalFrame* frame, const ResourceRequest& reque st, const KURL& url, ReportingStatus status = SendReport) 63 static bool shouldBlockFetch(LocalFrame* frame, const ResourceRequest& reque st, const KURL& url, ReportingStatus status = SendReport)
64 { 64 {
65 return shouldBlockFetch(frame, request.requestContext(), request.frameTy pe(), url, status); 65 return shouldBlockFetch(frame, request.requestContext(), request.frameTy pe(), request.redirectStatus(), url, status);
66 } 66 }
67 67
68 static bool shouldBlockWebSocket(LocalFrame*, const KURL&, ReportingStatus = SendReport); 68 static bool shouldBlockWebSocket(LocalFrame*, const KURL&, ReportingStatus = SendReport);
69 69
70 static bool isMixedContent(SecurityOrigin*, const KURL&); 70 static bool isMixedContent(SecurityOrigin*, const KURL&);
71 static bool isMixedFormAction(LocalFrame*, const KURL&, ReportingStatus = Se ndReport); 71 static bool isMixedFormAction(LocalFrame*, const KURL&, ReportingStatus = Se ndReport);
72 72
73 static void checkMixedPrivatePublic(LocalFrame*, const AtomicString& resourc eIPAddress); 73 static void checkMixedPrivatePublic(LocalFrame*, const AtomicString& resourc eIPAddress);
74 74
75 static ContextType contextTypeForInspector(LocalFrame*, const ResourceReques t&); 75 static ContextType contextTypeForInspector(LocalFrame*, const ResourceReques t&);
(...skipping 18 matching lines...) Expand all
94 static ContextType contextTypeFromContext(WebURLRequest::RequestContext, Fra me*); 94 static ContextType contextTypeFromContext(WebURLRequest::RequestContext, Fra me*);
95 static const char* typeNameFromContext(WebURLRequest::RequestContext); 95 static const char* typeNameFromContext(WebURLRequest::RequestContext);
96 static void logToConsoleAboutFetch(LocalFrame*, const KURL&, const KURL&, We bURLRequest::RequestContext, bool allowed); 96 static void logToConsoleAboutFetch(LocalFrame*, const KURL&, const KURL&, We bURLRequest::RequestContext, bool allowed);
97 static void logToConsoleAboutWebSocket(LocalFrame*, const KURL&, const KURL& , bool allowed); 97 static void logToConsoleAboutWebSocket(LocalFrame*, const KURL&, const KURL& , bool allowed);
98 static void count(Frame*, WebURLRequest::RequestContext); 98 static void count(Frame*, WebURLRequest::RequestContext);
99 }; 99 };
100 100
101 } // namespace blink 101 } // namespace blink
102 102
103 #endif // MixedContentChecker_h 103 #endif // MixedContentChecker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698