| 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 | 363 |
| 364 Settings* settings = mixedFrame->settings(); | 364 Settings* settings = mixedFrame->settings(); |
| 365 FrameLoaderClient* client = mixedFrame->loader().client(); | 365 FrameLoaderClient* client = mixedFrame->loader().client(); |
| 366 SecurityOrigin* securityOrigin = mixedFrame->document()->securityOrigin(); | 366 SecurityOrigin* securityOrigin = mixedFrame->document()->securityOrigin(); |
| 367 bool allowed = false; | 367 bool allowed = false; |
| 368 | 368 |
| 369 // If we're in strict mode, we'll automagically fail everything, and intenti
onally skip | 369 // If we're in strict mode, we'll automagically fail everything, and intenti
onally skip |
| 370 // the client checks in order to prevent degrading the site's security UI. | 370 // the client checks in order to prevent degrading the site's security UI. |
| 371 bool strictMode = mixedFrame->document()->shouldEnforceStrictMixedContentChe
cking() || settings->strictMixedContentChecking(); | 371 bool strictMode = mixedFrame->document()->shouldEnforceStrictMixedContentChe
cking() || settings->strictMixedContentChecking(); |
| 372 if (!strictMode) { | 372 if (!strictMode) { |
| 373 bool allowedPerSettings = settings && (settings->allowRunningOfInsecureC
ontent() || settings->allowConnectingInsecureWebSocket()); | 373 bool allowedPerSettings = settings && settings->allowRunningOfInsecureCo
ntent(); |
| 374 allowed = client->allowRunningInsecureContent(allowedPerSettings, securi
tyOrigin, url); | 374 allowed = client->allowRunningInsecureContent(allowedPerSettings, securi
tyOrigin, url); |
| 375 } | 375 } |
| 376 | 376 |
| 377 if (allowed) | 377 if (allowed) |
| 378 client->didRunInsecureContent(securityOrigin, url); | 378 client->didRunInsecureContent(securityOrigin, url); |
| 379 | 379 |
| 380 if (reportingStatus == SendReport) | 380 if (reportingStatus == SendReport) |
| 381 logToConsoleAboutWebSocket(frame, url, allowed); | 381 logToConsoleAboutWebSocket(frame, url, allowed); |
| 382 return !allowed; | 382 return !allowed; |
| 383 } | 383 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 412 { | 412 { |
| 413 if (!frame || !frame->document() || !frame->document()->loader()) | 413 if (!frame || !frame->document() || !frame->document()->loader()) |
| 414 return; | 414 return; |
| 415 | 415 |
| 416 // Just count these for the moment, don't block them. | 416 // Just count these for the moment, don't block them. |
| 417 if (Platform::current()->isReservedIPAddress(resourceIPAddress) && !frame->d
ocument()->isHostedInReservedIPRange()) | 417 if (Platform::current()->isReservedIPAddress(resourceIPAddress) && !frame->d
ocument()->isHostedInReservedIPRange()) |
| 418 UseCounter::count(frame->document(), UseCounter::MixedContentPrivateHost
nameInPublicHostname); | 418 UseCounter::count(frame->document(), UseCounter::MixedContentPrivateHost
nameInPublicHostname); |
| 419 } | 419 } |
| 420 | 420 |
| 421 } // namespace blink | 421 } // namespace blink |
| OLD | NEW |