| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
| 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
| 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 ScriptResource::~ScriptResource() | 48 ScriptResource::~ScriptResource() |
| 49 { | 49 { |
| 50 } | 50 } |
| 51 | 51 |
| 52 void ScriptResource::didAddClient(ResourceClient* client) | 52 void ScriptResource::didAddClient(ResourceClient* client) |
| 53 { | 53 { |
| 54 ASSERT(client->resourceClientType() == ScriptResourceClient::expectedType())
; | 54 ASSERT(client->resourceClientType() == ScriptResourceClient::expectedType())
; |
| 55 Resource::didAddClient(client); | 55 Resource::didAddClient(client); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void ScriptResource::appendData(const char* data, int length) | 58 void ScriptResource::appendData(const char* data, unsigned length) |
| 59 { | 59 { |
| 60 Resource::appendData(data, length); | 60 Resource::appendData(data, length); |
| 61 ResourceClientWalker<ScriptResourceClient> walker(m_clients); | 61 ResourceClientWalker<ScriptResourceClient> walker(m_clients); |
| 62 while (ScriptResourceClient* client = walker.next()) | 62 while (ScriptResourceClient* client = walker.next()) |
| 63 client->notifyAppendData(this); | 63 client->notifyAppendData(this); |
| 64 } | 64 } |
| 65 | 65 |
| 66 AtomicString ScriptResource::mimeType() const | 66 AtomicString ScriptResource::mimeType() const |
| 67 { | 67 { |
| 68 return extractMIMETypeFromMediaType(m_response.httpHeaderField("Content-Type
")).lower(); | 68 return extractMIMETypeFromMediaType(m_response.httpHeaderField("Content-Type
")).lower(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 85 | 85 |
| 86 return m_script.string(); | 86 return m_script.string(); |
| 87 } | 87 } |
| 88 | 88 |
| 89 bool ScriptResource::mimeTypeAllowedByNosniff() const | 89 bool ScriptResource::mimeTypeAllowedByNosniff() const |
| 90 { | 90 { |
| 91 return parseContentTypeOptionsHeader(m_response.httpHeaderField("X-Content-T
ype-Options")) != ContentTypeOptionsNosniff || MIMETypeRegistry::isSupportedJava
ScriptMIMEType(mimeType()); | 91 return parseContentTypeOptionsHeader(m_response.httpHeaderField("X-Content-T
ype-Options")) != ContentTypeOptionsNosniff || MIMETypeRegistry::isSupportedJava
ScriptMIMEType(mimeType()); |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace blink | 94 } // namespace blink |
| OLD | NEW |