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 21 matching lines...) Expand all Loading... | |
32 #define MixedContentChecker_h | 32 #define MixedContentChecker_h |
33 | 33 |
34 #include "wtf/text/WTFString.h" | 34 #include "wtf/text/WTFString.h" |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 class LocalFrame; | 38 class LocalFrame; |
39 class FrameLoaderClient; | 39 class FrameLoaderClient; |
40 class KURL; | 40 class KURL; |
41 class SecurityOrigin; | 41 class SecurityOrigin; |
42 class ResourceRequest; | |
42 | 43 |
43 class MixedContentChecker { | 44 class MixedContentChecker { |
44 WTF_MAKE_NONCOPYABLE(MixedContentChecker); | 45 WTF_MAKE_NONCOPYABLE(MixedContentChecker); |
45 public: | 46 public: |
47 enum ContextType { | |
48 Blockable, | |
jochen (gone - plz use gerrit)
2014/09/05 08:26:14
why is this public?
what about ContextTypeBlockab
| |
49 OptionallyBlockable, | |
50 ShouldBeBlockable, | |
51 BlockableUnlessLax | |
52 }; | |
53 | |
46 MixedContentChecker(LocalFrame*); | 54 MixedContentChecker(LocalFrame*); |
jochen (gone - plz use gerrit)
2014/09/05 08:26:14
explicit?
| |
47 | 55 |
56 static bool shouldBlockFetch(LocalFrame*, const ResourceRequest&, const KURL &); | |
57 static bool shouldBlockSubresourceFetch(LocalFrame*, const ResourceRequest&, const KURL&); | |
58 | |
48 bool canDisplayInsecureContent(SecurityOrigin* securityOrigin, const KURL& u rl) const | 59 bool canDisplayInsecureContent(SecurityOrigin* securityOrigin, const KURL& u rl) const |
49 { | 60 { |
50 return canDisplayInsecureContentInternal(securityOrigin, url, MixedConte ntChecker::Display); | 61 return canDisplayInsecureContentInternal(securityOrigin, url, MixedConte ntChecker::Display); |
51 } | 62 } |
52 | 63 |
53 bool canRunInsecureContent(SecurityOrigin* securityOrigin, const KURL& url) const | 64 bool canRunInsecureContent(SecurityOrigin* securityOrigin, const KURL& url) const |
54 { | 65 { |
55 return canRunInsecureContentInternal(securityOrigin, url, MixedContentCh ecker::Execution); | 66 return canRunInsecureContentInternal(securityOrigin, url, MixedContentCh ecker::Execution); |
56 } | 67 } |
57 | 68 |
(...skipping 18 matching lines...) Expand all Loading... | |
76 bool canRunInsecureContentInternal(SecurityOrigin*, const KURL&, const Mixed ContentType) const; | 87 bool canRunInsecureContentInternal(SecurityOrigin*, const KURL&, const Mixed ContentType) const; |
77 | 88 |
78 void logWarning(bool allowed, const KURL& i, const MixedContentType) const; | 89 void logWarning(bool allowed, const KURL& i, const MixedContentType) const; |
79 | 90 |
80 LocalFrame* m_frame; | 91 LocalFrame* m_frame; |
81 }; | 92 }; |
82 | 93 |
83 } // namespace blink | 94 } // namespace blink |
84 | 95 |
85 #endif // MixedContentChecker_h | 96 #endif // MixedContentChecker_h |
OLD | NEW |