| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |