| 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 contextType = ContextTypeOptionallyBlockable; | 316 contextType = ContextTypeOptionallyBlockable; |
| 317 | 317 |
| 318 switch (contextType) { | 318 switch (contextType) { |
| 319 case ContextTypeOptionallyBlockable: | 319 case ContextTypeOptionallyBlockable: |
| 320 allowed = !strictMode && client->allowDisplayingInsecureContent(settings
&& settings->allowDisplayOfInsecureContent(), securityOrigin, url); | 320 allowed = !strictMode && client->allowDisplayingInsecureContent(settings
&& settings->allowDisplayOfInsecureContent(), securityOrigin, url); |
| 321 if (allowed) | 321 if (allowed) |
| 322 client->didDisplayInsecureContent(); | 322 client->didDisplayInsecureContent(); |
| 323 break; | 323 break; |
| 324 | 324 |
| 325 case ContextTypeBlockable: | 325 case ContextTypeBlockable: |
| 326 allowed = !strictMode && client->allowRunningInsecureContent(settings &&
settings->allowRunningOfInsecureContent(), securityOrigin, url); | 326 allowed = !strictMode && !settings->strictlyBlockBlockableMixedContent()
&& client->allowRunningInsecureContent(settings && settings->allowRunningOfInse
cureContent(), securityOrigin, url); |
| 327 if (allowed) { | 327 if (allowed) { |
| 328 client->didRunInsecureContent(securityOrigin, url); | 328 client->didRunInsecureContent(securityOrigin, url); |
| 329 UseCounter::count(mixedFrame, UseCounter::MixedContentBlockableAllow
ed); | 329 UseCounter::count(mixedFrame, UseCounter::MixedContentBlockableAllow
ed); |
| 330 } | 330 } |
| 331 break; | 331 break; |
| 332 | 332 |
| 333 case ContextTypeShouldBeBlockable: | 333 case ContextTypeShouldBeBlockable: |
| 334 allowed = !strictMode; | 334 allowed = !strictMode; |
| 335 if (allowed) | 335 if (allowed) |
| 336 client->didDisplayInsecureContent(); | 336 client->didDisplayInsecureContent(); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 { | 414 { |
| 415 if (!frame || !frame->document() || !frame->document()->loader()) | 415 if (!frame || !frame->document() || !frame->document()->loader()) |
| 416 return; | 416 return; |
| 417 | 417 |
| 418 // Just count these for the moment, don't block them. | 418 // Just count these for the moment, don't block them. |
| 419 if (Platform::current()->isReservedIPAddress(resourceIPAddress) && !frame->d
ocument()->isHostedInReservedIPRange()) | 419 if (Platform::current()->isReservedIPAddress(resourceIPAddress) && !frame->d
ocument()->isHostedInReservedIPRange()) |
| 420 UseCounter::count(frame->document(), UseCounter::MixedContentPrivateHost
nameInPublicHostname); | 420 UseCounter::count(frame->document(), UseCounter::MixedContentPrivateHost
nameInPublicHostname); |
| 421 } | 421 } |
| 422 | 422 |
| 423 } // namespace blink | 423 } // namespace blink |
| OLD | NEW |