| 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef MixedContentChecker_h | 31 #ifndef MixedContentChecker_h |
| 32 #define MixedContentChecker_h | 32 #define MixedContentChecker_h |
| 33 | 33 |
| 34 #include "base/gtest_prod_util.h" | 34 #include "base/gtest_prod_util.h" |
| 35 #include "core/CoreExport.h" | 35 #include "core/CoreExport.h" |
| 36 #include "platform/heap/Handle.h" | 36 #include "platform/heap/Handle.h" |
| 37 #include "platform/network/ResourceRequest.h" | 37 #include "platform/network/ResourceRequest.h" |
| 38 #include "public/platform/WebMixedContent.h" | |
| 39 #include "public/platform/WebURLRequest.h" | 38 #include "public/platform/WebURLRequest.h" |
| 40 #include "wtf/text/WTFString.h" | 39 #include "wtf/text/WTFString.h" |
| 41 | 40 |
| 42 namespace blink { | 41 namespace blink { |
| 43 | 42 |
| 43 enum class WebMixedContentContextType; |
| 44 class Frame; | 44 class Frame; |
| 45 class LocalFrame; | 45 class LocalFrame; |
| 46 class KURL; | 46 class KURL; |
| 47 class ResourceResponse; | 47 class ResourceResponse; |
| 48 class SecurityOrigin; | 48 class SecurityOrigin; |
| 49 | 49 |
| 50 class CORE_EXPORT MixedContentChecker final { | 50 class CORE_EXPORT MixedContentChecker final { |
| 51 WTF_MAKE_NONCOPYABLE(MixedContentChecker); | 51 WTF_MAKE_NONCOPYABLE(MixedContentChecker); |
| 52 DISALLOW_NEW(); | 52 DISALLOW_NEW(); |
| 53 | 53 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 73 ReportingStatus = SendReport); | 73 ReportingStatus = SendReport); |
| 74 | 74 |
| 75 static bool isMixedContent(SecurityOrigin*, const KURL&); | 75 static bool isMixedContent(SecurityOrigin*, const KURL&); |
| 76 static bool isMixedFormAction(LocalFrame*, | 76 static bool isMixedFormAction(LocalFrame*, |
| 77 const KURL&, | 77 const KURL&, |
| 78 ReportingStatus = SendReport); | 78 ReportingStatus = SendReport); |
| 79 | 79 |
| 80 static void checkMixedPrivatePublic(LocalFrame*, | 80 static void checkMixedPrivatePublic(LocalFrame*, |
| 81 const AtomicString& resourceIPAddress); | 81 const AtomicString& resourceIPAddress); |
| 82 | 82 |
| 83 static WebMixedContent::ContextType contextTypeForInspector( | 83 static WebMixedContentContextType contextTypeForInspector( |
| 84 LocalFrame*, | 84 LocalFrame*, |
| 85 const ResourceRequest&); | 85 const ResourceRequest&); |
| 86 | 86 |
| 87 // Returns the frame that should be considered the effective frame | 87 // Returns the frame that should be considered the effective frame |
| 88 // for a mixed content check for the given frame type. | 88 // for a mixed content check for the given frame type. |
| 89 static Frame* effectiveFrameForFrameType(LocalFrame*, | 89 static Frame* effectiveFrameForFrameType(LocalFrame*, |
| 90 WebURLRequest::FrameType); | 90 WebURLRequest::FrameType); |
| 91 | 91 |
| 92 static void handleCertificateError(LocalFrame*, | 92 static void handleCertificateError(LocalFrame*, |
| 93 const ResourceResponse&, | 93 const ResourceResponse&, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 109 static void logToConsoleAboutWebSocket(LocalFrame*, | 109 static void logToConsoleAboutWebSocket(LocalFrame*, |
| 110 const KURL&, | 110 const KURL&, |
| 111 const KURL&, | 111 const KURL&, |
| 112 bool allowed); | 112 bool allowed); |
| 113 static void count(Frame*, WebURLRequest::RequestContext); | 113 static void count(Frame*, WebURLRequest::RequestContext); |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 } // namespace blink | 116 } // namespace blink |
| 117 | 117 |
| 118 #endif // MixedContentChecker_h | 118 #endif // MixedContentChecker_h |
| OLD | NEW |