| 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 30 matching lines...) Expand all Loading... |
| 41 class SecurityOrigin; | 41 class SecurityOrigin; |
| 42 | 42 |
| 43 class MixedContentChecker { | 43 class MixedContentChecker { |
| 44 WTF_MAKE_NONCOPYABLE(MixedContentChecker); | 44 WTF_MAKE_NONCOPYABLE(MixedContentChecker); |
| 45 public: | 45 public: |
| 46 static bool shouldBlockFetch(LocalFrame*, WebURLRequest::RequestContext, Web
URLRequest::FrameType, const KURL&); | 46 static bool shouldBlockFetch(LocalFrame*, WebURLRequest::RequestContext, Web
URLRequest::FrameType, const KURL&); |
| 47 static bool shouldBlockWebSocket(LocalFrame*, const KURL&); | 47 static bool shouldBlockWebSocket(LocalFrame*, const KURL&); |
| 48 static bool checkFormAction(LocalFrame*, const KURL&); | 48 static bool checkFormAction(LocalFrame*, const KURL&); |
| 49 static bool isMixedContent(SecurityOrigin*, const KURL&); | 49 static bool isMixedContent(SecurityOrigin*, const KURL&); |
| 50 | 50 |
| 51 static void checkMixedPrivatePublic(LocalFrame*, const AtomicString& resourc
eIPAddress); |
| 52 |
| 51 private: | 53 private: |
| 52 enum ContextType { | 54 enum ContextType { |
| 53 ContextTypeBlockable, | 55 ContextTypeBlockable, |
| 54 ContextTypeOptionallyBlockable, | 56 ContextTypeOptionallyBlockable, |
| 55 ContextTypeShouldBeBlockable, | 57 ContextTypeShouldBeBlockable, |
| 56 ContextTypeBlockableUnlessLax | 58 ContextTypeBlockableUnlessLax |
| 57 }; | 59 }; |
| 58 | 60 |
| 59 static LocalFrame* inWhichFrameIsThisContentMixed(LocalFrame*, WebURLRequest
::RequestContext, WebURLRequest::FrameType, const KURL&); | 61 static LocalFrame* inWhichFrameIsThisContentMixed(LocalFrame*, WebURLRequest
::RequestContext, WebURLRequest::FrameType, const KURL&); |
| 60 static ContextType contextTypeFromContext(WebURLRequest::RequestContext); | 62 static ContextType contextTypeFromContext(WebURLRequest::RequestContext); |
| 61 static const char* typeNameFromContext(WebURLRequest::RequestContext); | 63 static const char* typeNameFromContext(WebURLRequest::RequestContext); |
| 62 static void logToConsole(LocalFrame*, const KURL&, WebURLRequest::RequestCon
text, bool allowed); | 64 static void logToConsole(LocalFrame*, const KURL&, WebURLRequest::RequestCon
text, bool allowed); |
| 63 }; | 65 }; |
| 64 | 66 |
| 65 } // namespace blink | 67 } // namespace blink |
| 66 | 68 |
| 67 #endif // MixedContentChecker_h | 69 #endif // MixedContentChecker_h |
| OLD | NEW |