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 LocalFrame; | 41 class LocalFrame; |
42 class KURL; | 42 class KURL; |
43 class SecurityOrigin; | 43 class SecurityOrigin; |
44 | 44 |
45 class MixedContentChecker final { | 45 class MixedContentChecker final { |
46 WTF_MAKE_NONCOPYABLE(MixedContentChecker); | 46 WTF_MAKE_NONCOPYABLE(MixedContentChecker); |
47 DISALLOW_ALLOCATION(); | 47 DISALLOW_ALLOCATION(); |
48 public: | 48 public: |
49 explicit MixedContentChecker(LocalFrame*); | 49 explicit MixedContentChecker(LocalFrame*); |
50 | 50 |
51 static bool shouldBlockFetch(LocalFrame*, const ResourceRequest&, const KURL &); | 51 enum SuppressLogType { LogIfBlocked, SuppressLog }; |
Mike West
2014/11/14 08:08:17
Please use the same language as we use in CSP: htt
kouhei (in TOK)
2014/11/14 09:19:31
Done.
| |
52 static bool shouldBlockFetch(LocalFrame*, const ResourceRequest&, const KURL &, SuppressLogType); | |
52 | 53 |
53 bool canDisplayInsecureContent(SecurityOrigin* securityOrigin, const KURL& u rl) const | 54 bool canDisplayInsecureContent(SecurityOrigin* securityOrigin, const KURL& u rl) const |
54 { | 55 { |
55 return canDisplayInsecureContentInternal(securityOrigin, url, MixedConte ntChecker::Display); | 56 return canDisplayInsecureContentInternal(securityOrigin, url, MixedConte ntChecker::Display); |
56 } | 57 } |
57 | 58 |
58 bool canRunInsecureContent(SecurityOrigin* securityOrigin, const KURL& url) const | 59 bool canRunInsecureContent(SecurityOrigin* securityOrigin, const KURL& url) const |
59 { | 60 { |
60 return canRunInsecureContentInternal(securityOrigin, url, MixedContentCh ecker::Execution); | 61 return canRunInsecureContentInternal(securityOrigin, url, MixedContentCh ecker::Execution); |
61 } | 62 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
96 bool canRunInsecureContentInternal(SecurityOrigin*, const KURL&, const Mixed ContentType) const; | 97 bool canRunInsecureContentInternal(SecurityOrigin*, const KURL&, const Mixed ContentType) const; |
97 | 98 |
98 void logWarning(bool allowed, const KURL& i, const MixedContentType) const; | 99 void logWarning(bool allowed, const KURL& i, const MixedContentType) const; |
99 | 100 |
100 RawPtrWillBeMember<LocalFrame> m_frame; | 101 RawPtrWillBeMember<LocalFrame> m_frame; |
101 }; | 102 }; |
102 | 103 |
103 } // namespace blink | 104 } // namespace blink |
104 | 105 |
105 #endif // MixedContentChecker_h | 106 #endif // MixedContentChecker_h |
OLD | NEW |