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

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

Issue 2278303002: Remove the allow-displaying-mixed-content setting from Blink. (Closed)
Patch Set: Fixed missign deprecated preference registration. Created 4 years, 3 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // If we're dealing with a CORS-enabled scheme, then block mixed frames as a ctive content. Otherwise, 210 // If we're dealing with a CORS-enabled scheme, then block mixed frames as a ctive content. Otherwise,
211 // treat frames as passive content. 211 // treat frames as passive content.
212 // 212 //
213 // FIXME: Remove this temporary hack once we have a reasonable API for launc hing external applications 213 // FIXME: Remove this temporary hack once we have a reasonable API for launc hing external applications
214 // via URLs. http://crbug.com/318788 and https://crbug.com/393481 214 // via URLs. http://crbug.com/318788 and https://crbug.com/393481
215 if (frameType == WebURLRequest::FrameTypeNested && !SchemeRegistry::shouldTr eatURLSchemeAsCORSEnabled(url.protocol())) 215 if (frameType == WebURLRequest::FrameTypeNested && !SchemeRegistry::shouldTr eatURLSchemeAsCORSEnabled(url.protocol()))
216 contextType = WebMixedContent::ContextType::OptionallyBlockable; 216 contextType = WebMixedContent::ContextType::OptionallyBlockable;
217 217
218 switch (contextType) { 218 switch (contextType) {
219 case WebMixedContent::ContextType::OptionallyBlockable: 219 case WebMixedContent::ContextType::OptionallyBlockable:
220 allowed = !strictMode && client->allowDisplayingInsecureContent(settings && settings->allowDisplayOfInsecureContent(), url); 220 client->passiveInsecureContentFound(url);
221 allowed = !strictMode;
221 if (allowed) 222 if (allowed)
222 client->didDisplayInsecureContent(); 223 client->didDisplayInsecureContent();
223 break; 224 break;
224 225
225 case WebMixedContent::ContextType::Blockable: { 226 case WebMixedContent::ContextType::Blockable: {
226 // Strictly block subresources that are mixed with respect to 227 // Strictly block subresources that are mixed with respect to
227 // their subframes, unless all insecure content is allowed. This 228 // their subframes, unless all insecure content is allowed. This
228 // is to avoid the following situation: https://a.com embeds 229 // is to avoid the following situation: https://a.com embeds
229 // https://b.com, which loads a script over insecure HTTP. The 230 // https://b.com, which loads a script over insecure HTTP. The
230 // user opts to allow the insecure content, thinking that they are 231 // user opts to allow the insecure content, thinking that they are
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 // See comment in shouldBlockFetch() about loading the main resource of a su bframe. 394 // See comment in shouldBlockFetch() about loading the main resource of a su bframe.
394 if (request.frameType() == WebURLRequest::FrameTypeNested && !SchemeRegistry ::shouldTreatURLSchemeAsCORSEnabled(request.url().protocol())) { 395 if (request.frameType() == WebURLRequest::FrameTypeNested && !SchemeRegistry ::shouldTreatURLSchemeAsCORSEnabled(request.url().protocol())) {
395 return WebMixedContent::ContextType::OptionallyBlockable; 396 return WebMixedContent::ContextType::OptionallyBlockable;
396 } 397 }
397 398
398 bool strictMixedContentCheckingForPlugin = mixedFrame->settings() && mixedFr ame->settings()->strictMixedContentCheckingForPlugin(); 399 bool strictMixedContentCheckingForPlugin = mixedFrame->settings() && mixedFr ame->settings()->strictMixedContentCheckingForPlugin();
399 return WebMixedContent::contextTypeFromRequestContext(request.requestContext (), strictMixedContentCheckingForPlugin); 400 return WebMixedContent::contextTypeFromRequestContext(request.requestContext (), strictMixedContentCheckingForPlugin);
400 } 401 }
401 402
402 } // namespace blink 403 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoaderClient.h ('k') | third_party/WebKit/Source/web/FrameLoaderClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698