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

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

Issue 2765643002: Revert of PlzNavigate: send SourceLocation when mixed content is found (Closed)
Patch Set: Created 3 years, 9 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 29 matching lines...) Expand all
40 #include "public/platform/WebURLRequest.h" 40 #include "public/platform/WebURLRequest.h"
41 #include "wtf/text/WTFString.h" 41 #include "wtf/text/WTFString.h"
42 42
43 namespace blink { 43 namespace blink {
44 44
45 class Frame; 45 class Frame;
46 class LocalFrame; 46 class LocalFrame;
47 class KURL; 47 class KURL;
48 class ResourceResponse; 48 class ResourceResponse;
49 class SecurityOrigin; 49 class SecurityOrigin;
50 class SourceLocation;
51 50
52 // Checks resource loads for mixed content. If PlzNavigate is enabled then this 51 // Checks resource loads for mixed content. If PlzNavigate is enabled then this
53 // class only checks for sub-resource loads while frame-level loads are 52 // class only checks for sub-resource loads while frame-level loads are
54 // delegated to the browser where they are checked by 53 // delegated to the browser where they are checked by
55 // MixedContentNavigationThrottle. Changes to this class might need to be 54 // MixedContentNavigationThrottle. Changes to this class might need to be
56 // reflected on its browser counterpart. 55 // reflected on its browser counterpart.
57 // 56 //
58 // Current mixed content W3C draft that drives this implementation: 57 // Current mixed content W3C draft that drives this implementation:
59 // https://w3c.github.io/webappsec-mixed-content/ 58 // https://w3c.github.io/webappsec-mixed-content/
60 class CORE_EXPORT MixedContentChecker final { 59 class CORE_EXPORT MixedContentChecker final {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 const ResourceResponse&, 106 const ResourceResponse&,
108 WebURLRequest::FrameType, 107 WebURLRequest::FrameType,
109 WebURLRequest::RequestContext); 108 WebURLRequest::RequestContext);
110 109
111 // Receive information about mixed content found externally. 110 // Receive information about mixed content found externally.
112 static void mixedContentFound(LocalFrame*, 111 static void mixedContentFound(LocalFrame*,
113 const KURL& mainResourceUrl, 112 const KURL& mainResourceUrl,
114 const KURL& mixedContentUrl, 113 const KURL& mixedContentUrl,
115 WebURLRequest::RequestContext, 114 WebURLRequest::RequestContext,
116 bool wasAllowed, 115 bool wasAllowed,
117 bool hadRedirect, 116 bool hadRedirect);
118 std::unique_ptr<SourceLocation>);
119 117
120 private: 118 private:
121 FRIEND_TEST_ALL_PREFIXES(MixedContentCheckerTest, HandleCertificateError); 119 FRIEND_TEST_ALL_PREFIXES(MixedContentCheckerTest, HandleCertificateError);
122 120
123 static Frame* inWhichFrameIsContentMixed(Frame*, 121 static Frame* inWhichFrameIsContentMixed(Frame*,
124 WebURLRequest::FrameType, 122 WebURLRequest::FrameType,
125 const KURL&); 123 const KURL&);
126 124
127 static void logToConsoleAboutFetch(LocalFrame*, 125 static void logToConsoleAboutFetch(LocalFrame*,
128 const KURL&, 126 const KURL&,
129 const KURL&, 127 const KURL&,
130 WebURLRequest::RequestContext, 128 WebURLRequest::RequestContext,
131 bool allowed, 129 bool allowed);
132 std::unique_ptr<SourceLocation>);
133 static void logToConsoleAboutWebSocket(LocalFrame*, 130 static void logToConsoleAboutWebSocket(LocalFrame*,
134 const KURL&, 131 const KURL&,
135 const KURL&, 132 const KURL&,
136 bool allowed); 133 bool allowed);
137 static void count(Frame*, WebURLRequest::RequestContext); 134 static void count(Frame*, WebURLRequest::RequestContext);
138 }; 135 };
139 136
140 } // namespace blink 137 } // namespace blink
141 138
142 #endif // MixedContentChecker_h 139 #endif // MixedContentChecker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698