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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 bool wasAllowed, | 579 bool wasAllowed, |
580 bool hadRedirect) { | 580 bool hadRedirect) { |
581 // Logs to the frame console. | 581 // Logs to the frame console. |
582 logToConsoleAboutFetch(frame, mainResourceUrl, mixedContentUrl, | 582 logToConsoleAboutFetch(frame, mainResourceUrl, mixedContentUrl, |
583 requestContext, wasAllowed); | 583 requestContext, wasAllowed); |
584 // Reports to the CSP policy. | 584 // Reports to the CSP policy. |
585 ContentSecurityPolicy* policy = | 585 ContentSecurityPolicy* policy = |
586 frame->securityContext()->contentSecurityPolicy(); | 586 frame->securityContext()->contentSecurityPolicy(); |
587 if (policy) { | 587 if (policy) { |
588 policy->reportMixedContent( | 588 policy->reportMixedContent( |
589 mixedContentUrl, hadRedirect | 589 mixedContentUrl, |
590 ? ResourceRequest::RedirectStatus::FollowedRedirect | 590 hadRedirect ? ResourceRequest::RedirectStatus::FollowedRedirect |
591 : ResourceRequest::RedirectStatus::NoRedirect); | 591 : ResourceRequest::RedirectStatus::NoRedirect); |
592 } | 592 } |
593 } | 593 } |
594 | 594 |
595 WebMixedContentContextType MixedContentChecker::contextTypeForInspector( | 595 WebMixedContentContextType MixedContentChecker::contextTypeForInspector( |
596 LocalFrame* frame, | 596 LocalFrame* frame, |
597 const ResourceRequest& request) { | 597 const ResourceRequest& request) { |
598 Frame* effectiveFrame = | 598 Frame* effectiveFrame = |
599 effectiveFrameForFrameType(frame, request.frameType()); | 599 effectiveFrameForFrameType(frame, request.frameType()); |
600 | 600 |
601 Frame* mixedFrame = inWhichFrameIsContentMixed( | 601 Frame* mixedFrame = inWhichFrameIsContentMixed( |
(...skipping 10 matching lines...) Expand all Loading... |
612 } | 612 } |
613 | 613 |
614 bool strictMixedContentCheckingForPlugin = | 614 bool strictMixedContentCheckingForPlugin = |
615 mixedFrame->settings() && | 615 mixedFrame->settings() && |
616 mixedFrame->settings()->getStrictMixedContentCheckingForPlugin(); | 616 mixedFrame->settings()->getStrictMixedContentCheckingForPlugin(); |
617 return WebMixedContent::contextTypeFromRequestContext( | 617 return WebMixedContent::contextTypeFromRequestContext( |
618 request.requestContext(), strictMixedContentCheckingForPlugin); | 618 request.requestContext(), strictMixedContentCheckingForPlugin); |
619 } | 619 } |
620 | 620 |
621 } // namespace blink | 621 } // namespace blink |
OLD | NEW |