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

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

Issue 1031833004: Remove allowConnectingInsecureWebSocket Settings item (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed build Created 5 years, 8 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 | « Source/core/frame/Settings.in ('k') | Source/web/WebSettingsImpl.h » ('j') | 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/core/frame/Settings.in ('k') | Source/web/WebSettingsImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698