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

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

Issue 1326593002: Fix plugins' mixed content status. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // "Optionally-blockable" mixed content 105 // "Optionally-blockable" mixed content
106 case WebURLRequest::RequestContextAudio: 106 case WebURLRequest::RequestContextAudio:
107 case WebURLRequest::RequestContextFavicon: 107 case WebURLRequest::RequestContextFavicon:
108 case WebURLRequest::RequestContextImage: 108 case WebURLRequest::RequestContextImage:
109 case WebURLRequest::RequestContextVideo: 109 case WebURLRequest::RequestContextVideo:
110 return ContextTypeOptionallyBlockable; 110 return ContextTypeOptionallyBlockable;
111 111
112 // Plugins! Oh how dearly we love plugin-loaded content! 112 // Plugins! Oh how dearly we love plugin-loaded content!
113 case WebURLRequest::RequestContextPlugin: { 113 case WebURLRequest::RequestContextPlugin: {
114 Settings* settings = frame->settings(); 114 Settings* settings = frame->settings();
115 return settings || settings->strictMixedContentCheckingForPlugin() ? Con textTypeBlockable : ContextTypeOptionallyBlockable; 115 return settings && settings->strictMixedContentCheckingForPlugin() ? Con textTypeBlockable : ContextTypeOptionallyBlockable;
116 } 116 }
117 117
118 // "Blockable" mixed content 118 // "Blockable" mixed content
119 case WebURLRequest::RequestContextBeacon: 119 case WebURLRequest::RequestContextBeacon:
120 case WebURLRequest::RequestContextCSPReport: 120 case WebURLRequest::RequestContextCSPReport:
121 case WebURLRequest::RequestContextEmbed: 121 case WebURLRequest::RequestContextEmbed:
122 case WebURLRequest::RequestContextEventSource: 122 case WebURLRequest::RequestContextEventSource:
123 case WebURLRequest::RequestContextFetch: 123 case WebURLRequest::RequestContextFetch:
124 case WebURLRequest::RequestContextFont: 124 case WebURLRequest::RequestContextFont:
125 case WebURLRequest::RequestContextForm: 125 case WebURLRequest::RequestContextForm:
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 455
456 // See comment in shouldBlockFetch() about loading the main resource of a su bframe. 456 // See comment in shouldBlockFetch() about loading the main resource of a su bframe.
457 if (request.frameType() == WebURLRequest::FrameTypeNested && !SchemeRegistry ::shouldTreatURLSchemeAsCORSEnabled(request.url().protocol())) { 457 if (request.frameType() == WebURLRequest::FrameTypeNested && !SchemeRegistry ::shouldTreatURLSchemeAsCORSEnabled(request.url().protocol())) {
458 return ContextTypeOptionallyBlockable; 458 return ContextTypeOptionallyBlockable;
459 } 459 }
460 460
461 return contextTypeFromContext(request.requestContext(), mixedFrame); 461 return contextTypeFromContext(request.requestContext(), mixedFrame);
462 } 462 }
463 463
464 } // namespace blink 464 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698