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

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

Issue 2497893006: Small fix to passive mixed-content reporting. (Closed)
Patch Set: Created 4 years, 1 month 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // 256 //
257 // FIXME: Remove this temporary hack once we have a reasonable API for 257 // FIXME: Remove this temporary hack once we have a reasonable API for
258 // launching external applications via URLs. http://crbug.com/318788 and 258 // launching external applications via URLs. http://crbug.com/318788 and
259 // https://crbug.com/393481 259 // https://crbug.com/393481
260 if (frameType == WebURLRequest::FrameTypeNested && 260 if (frameType == WebURLRequest::FrameTypeNested &&
261 !SchemeRegistry::shouldTreatURLSchemeAsCORSEnabled(url.protocol())) 261 !SchemeRegistry::shouldTreatURLSchemeAsCORSEnabled(url.protocol()))
262 contextType = WebMixedContent::ContextType::OptionallyBlockable; 262 contextType = WebMixedContent::ContextType::OptionallyBlockable;
263 263
264 switch (contextType) { 264 switch (contextType) {
265 case WebMixedContent::ContextType::OptionallyBlockable: 265 case WebMixedContent::ContextType::OptionallyBlockable:
266 client->passiveInsecureContentFound(url);
267 allowed = !strictMode; 266 allowed = !strictMode;
268 if (allowed) 267 if (allowed) {
268 client->passiveInsecureContentFound(url);
269 client->didDisplayInsecureContent(); 269 client->didDisplayInsecureContent();
270 }
270 break; 271 break;
271 272
272 case WebMixedContent::ContextType::Blockable: { 273 case WebMixedContent::ContextType::Blockable: {
273 // Strictly block subresources that are mixed with respect to their 274 // Strictly block subresources that are mixed with respect to their
274 // subframes, unless all insecure content is allowed. This is to avoid the 275 // subframes, unless all insecure content is allowed. This is to avoid the
275 // following situation: https://a.com embeds https://b.com, which loads a 276 // following situation: https://a.com embeds https://b.com, which loads a
276 // script over insecure HTTP. The user opts to allow the insecure content, 277 // script over insecure HTTP. The user opts to allow the insecure content,
277 // thinking that they are allowing an insecure script to run on 278 // thinking that they are allowing an insecure script to run on
278 // https://a.com and not realizing that they are in fact allowing an 279 // https://a.com and not realizing that they are in fact allowing an
279 // insecure script on https://b.com. 280 // insecure script on https://b.com.
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 } 508 }
508 509
509 bool strictMixedContentCheckingForPlugin = 510 bool strictMixedContentCheckingForPlugin =
510 mixedFrame->settings() && 511 mixedFrame->settings() &&
511 mixedFrame->settings()->strictMixedContentCheckingForPlugin(); 512 mixedFrame->settings()->strictMixedContentCheckingForPlugin();
512 return WebMixedContent::contextTypeFromRequestContext( 513 return WebMixedContent::contextTypeFromRequestContext(
513 request.requestContext(), strictMixedContentCheckingForPlugin); 514 request.requestContext(), strictMixedContentCheckingForPlugin);
514 } 515 }
515 516
516 } // namespace blink 517 } // 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