OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2011 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 12 matching lines...) Expand all Loading... |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 * | 24 * |
25 */ | 25 */ |
26 | 26 |
27 #include "config.h" | 27 #include "config.h" |
28 #include "SecurityContext.h" | 28 #include "SecurityContext.h" |
29 | 29 |
30 #include "ContentSecurityPolicy.h" | 30 #include "ContentSecurityPolicy.h" |
31 #include "HTMLParserIdioms.h" | 31 #include "HTMLParserIdioms.h" |
32 #include "SecurityOrigin.h" | 32 #include "SecurityOrigin.h" |
33 #include "WebCoreMemoryInstrumentation.h" | |
34 #include <wtf/text/StringBuilder.h> | 33 #include <wtf/text/StringBuilder.h> |
35 | 34 |
36 namespace WebCore { | 35 namespace WebCore { |
37 | 36 |
38 SecurityContext::SecurityContext() | 37 SecurityContext::SecurityContext() |
39 : m_mayDisplaySeamlesslyWithParent(false) | 38 : m_mayDisplaySeamlesslyWithParent(false) |
40 , m_haveInitializedSecurityOrigin(false) | 39 , m_haveInitializedSecurityOrigin(false) |
41 , m_sandboxFlags(SandboxNone) | 40 , m_sandboxFlags(SandboxNone) |
42 { | 41 { |
43 } | 42 } |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 if (numberOfTokenErrors > 1) | 135 if (numberOfTokenErrors > 1) |
137 tokenErrors.appendLiteral(" are invalid sandbox flags."); | 136 tokenErrors.appendLiteral(" are invalid sandbox flags."); |
138 else | 137 else |
139 tokenErrors.appendLiteral(" is an invalid sandbox flag."); | 138 tokenErrors.appendLiteral(" is an invalid sandbox flag."); |
140 invalidTokensErrorMessage = tokenErrors.toString(); | 139 invalidTokensErrorMessage = tokenErrors.toString(); |
141 } | 140 } |
142 | 141 |
143 return flags; | 142 return flags; |
144 } | 143 } |
145 | 144 |
146 void SecurityContext::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) cons
t | |
147 { | |
148 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); | |
149 info.addMember(m_securityOrigin, "securityOrigin"); | |
150 info.addMember(m_contentSecurityPolicy, "contentSecurityPolicy"); | |
151 } | 145 } |
152 | |
153 } | |
OLD | NEW |