Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: Source/core/fetch/ScriptResource.cpp

Issue 618583002: Correct data size argument type in resource loading path to unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698