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

Side by Side Diff: third_party/WebKit/Source/core/fetch/Resource.h

Issue 1757633005: Don't duplicate ResourceRequests and ResourceLoaderOptions on ResourceLoader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 bool isEligibleForIntegrityCheck(SecurityOrigin*) const; 178 bool isEligibleForIntegrityCheck(SecurityOrigin*) const;
179 179
180 void clearLoader(); 180 void clearLoader();
181 181
182 SharedBuffer* resourceBuffer() const { return m_data.get(); } 182 SharedBuffer* resourceBuffer() const { return m_data.get(); }
183 void setResourceBuffer(PassRefPtr<SharedBuffer>); 183 void setResourceBuffer(PassRefPtr<SharedBuffer>);
184 184
185 virtual void willFollowRedirect(ResourceRequest&, const ResourceResponse&); 185 virtual void willFollowRedirect(ResourceRequest&, const ResourceResponse&);
186 186
187 virtual void updateRequest(const ResourceRequest&) { }
188 virtual void responseReceived(const ResourceResponse&, PassOwnPtr<WebDataCon sumerHandle>); 187 virtual void responseReceived(const ResourceResponse&, PassOwnPtr<WebDataCon sumerHandle>);
189 void setResponse(const ResourceResponse& response) { m_response = response; } 188 void setResponse(const ResourceResponse& response) { m_response = response; }
190 const ResourceResponse& response() const { return m_response; } 189 const ResourceResponse& response() const { return m_response; }
191 190
192 virtual void reportResourceTimingToClients(const ResourceTimingInfo&) { } 191 virtual void reportResourceTimingToClients(const ResourceTimingInfo&) { }
193 192
194 // Sets the serialized metadata retrieved from the platform's cache. 193 // Sets the serialized metadata retrieved from the platform's cache.
195 virtual void setSerializedCachedMetadata(const char*, size_t); 194 virtual void setSerializedCachedMetadata(const char*, size_t);
196 195
197 // This may return nullptr when the resource isn't cacheable. 196 // This may return nullptr when the resource isn't cacheable.
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 Resource::Type m_type; 382 Resource::Type m_type;
384 }; 383 };
385 384
386 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ 385 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \
387 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType( ) == Resource::typeName, resource.getType() == Resource::typeName); \ 386 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType( ) == Resource::typeName, resource.getType() == Resource::typeName); \
388 inline typeName##Resource* to##typeName##Resource(const RefPtrWillBeRawPtr<R esource>& ptr) { return to##typeName##Resource(ptr.get()); } 387 inline typeName##Resource* to##typeName##Resource(const RefPtrWillBeRawPtr<R esource>& ptr) { return to##typeName##Resource(ptr.get()); }
389 388
390 } // namespace blink 389 } // namespace blink
391 390
392 #endif 391 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698