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

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

Issue 1583813003: Remove obsolete histogram values from SSL.InsecureContent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mpearson comment Created 4 years, 11 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
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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 // If we're dealing with a CORS-enabled scheme, then block mixed frames as a ctive content. Otherwise, 319 // If we're dealing with a CORS-enabled scheme, then block mixed frames as a ctive content. Otherwise,
320 // treat frames as passive content. 320 // treat frames as passive content.
321 // 321 //
322 // FIXME: Remove this temporary hack once we have a reasonable API for launc hing external applications 322 // FIXME: Remove this temporary hack once we have a reasonable API for launc hing external applications
323 // via URLs. http://crbug.com/318788 and https://crbug.com/393481 323 // via URLs. http://crbug.com/318788 and https://crbug.com/393481
324 if (frameType == WebURLRequest::FrameTypeNested && !SchemeRegistry::shouldTr eatURLSchemeAsCORSEnabled(url.protocol())) 324 if (frameType == WebURLRequest::FrameTypeNested && !SchemeRegistry::shouldTr eatURLSchemeAsCORSEnabled(url.protocol()))
325 contextType = ContextTypeOptionallyBlockable; 325 contextType = ContextTypeOptionallyBlockable;
326 326
327 switch (contextType) { 327 switch (contextType) {
328 case ContextTypeOptionallyBlockable: 328 case ContextTypeOptionallyBlockable:
329 allowed = !strictMode && client->allowDisplayingInsecureContent(settings && settings->allowDisplayOfInsecureContent(), securityOrigin, url); 329 allowed = !strictMode && client->allowDisplayingInsecureContent(settings && settings->allowDisplayOfInsecureContent(), url);
330 if (allowed) 330 if (allowed)
331 client->didDisplayInsecureContent(); 331 client->didDisplayInsecureContent();
332 break; 332 break;
333 333
334 case ContextTypeBlockable: { 334 case ContextTypeBlockable: {
335 // Strictly block subresources in subframes, unless all insecure 335 // Strictly block subresources in subframes, unless all insecure
336 // content is allowed. 336 // content is allowed.
337 if (!settings->allowRunningOfInsecureContent() && requestIsSubframeSubre source(frame, frameType)) { 337 if (!settings->allowRunningOfInsecureContent() && requestIsSubframeSubre source(frame, frameType)) {
338 UseCounter::count(mixedFrame, UseCounter::BlockableMixedContentInSub frameBlocked); 338 UseCounter::count(mixedFrame, UseCounter::BlockableMixedContentInSub frameBlocked);
339 allowed = false; 339 allowed = false;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 488
489 // See comment in shouldBlockFetch() about loading the main resource of a su bframe. 489 // See comment in shouldBlockFetch() about loading the main resource of a su bframe.
490 if (request.frameType() == WebURLRequest::FrameTypeNested && !SchemeRegistry ::shouldTreatURLSchemeAsCORSEnabled(request.url().protocol())) { 490 if (request.frameType() == WebURLRequest::FrameTypeNested && !SchemeRegistry ::shouldTreatURLSchemeAsCORSEnabled(request.url().protocol())) {
491 return ContextTypeOptionallyBlockable; 491 return ContextTypeOptionallyBlockable;
492 } 492 }
493 493
494 return contextTypeFromContext(request.requestContext(), mixedFrame); 494 return contextTypeFromContext(request.requestContext(), mixedFrame);
495 } 495 }
496 496
497 } // namespace blink 497 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoaderClient.h ('k') | third_party/WebKit/Source/web/FrameLoaderClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698