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

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

Issue 768753003: Downgrade the security of a secured page when plugins make insecure calls (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Layout test for prefetching from insecure source added Created 6 years 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 | « LayoutTests/http/tests/security/mixedContent/insecure-prefetch-in-main-frame-expected.txt ('k') | no next file » | 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 client->didDisplayInsecureContent(); 265 client->didDisplayInsecureContent();
266 break; 266 break;
267 267
268 case ContextTypeBlockable: 268 case ContextTypeBlockable:
269 allowed = client->allowRunningInsecureContent(settings && settings->allo wRunningOfInsecureContent(), securityOrigin, url); 269 allowed = client->allowRunningInsecureContent(settings && settings->allo wRunningOfInsecureContent(), securityOrigin, url);
270 if (allowed) 270 if (allowed)
271 client->didRunInsecureContent(securityOrigin, url); 271 client->didRunInsecureContent(securityOrigin, url);
272 break; 272 break;
273 273
274 case ContextTypeShouldBeBlockable: 274 case ContextTypeShouldBeBlockable:
275 return false; 275 allowed = true;
276 client->didDisplayInsecureContent();
277 break;
276 278
277 case ContextTypeBlockableUnlessLax: 279 case ContextTypeBlockableUnlessLax:
278 // We map this to either OptionallyBlockable or Blockable above. 280 // We map this to either OptionallyBlockable or Blockable above.
279 ASSERT_NOT_REACHED(); 281 ASSERT_NOT_REACHED();
280 return true; 282 return true;
281 }; 283 };
282 284
283 if (reportingStatus == SendReport) 285 if (reportingStatus == SendReport)
284 logToConsole(frame, url, resourceRequest.requestContext(), allowed); 286 logToConsole(frame, url, resourceRequest.requestContext(), allowed);
285 return !allowed; 287 return !allowed;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 if (Platform::current()->isReservedIPAddress(resourceIP) && !Platform::curre nt()->isReservedIPAddress(documentIP)) 418 if (Platform::current()->isReservedIPAddress(resourceIP) && !Platform::curre nt()->isReservedIPAddress(documentIP))
417 UseCounter::count(frame->document(), UseCounter::MixedContentPrivateHost nameInPublicHostname); 419 UseCounter::count(frame->document(), UseCounter::MixedContentPrivateHost nameInPublicHostname);
418 } 420 }
419 421
420 void MixedContentChecker::trace(Visitor* visitor) 422 void MixedContentChecker::trace(Visitor* visitor)
421 { 423 {
422 visitor->trace(m_frame); 424 visitor->trace(m_frame);
423 } 425 }
424 426
425 } // namespace blink 427 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/security/mixedContent/insecure-prefetch-in-main-frame-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698