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

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

Issue 126753002: Update the ResourceRequest in DocumentLoader after the embedder modified it (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updates Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/fetch/RawResource.cpp ('k') | Source/core/fetch/ResourceLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 void setCacheLiveResourcePriority(CacheLiveResourcePriority); 180 void setCacheLiveResourcePriority(CacheLiveResourcePriority);
181 unsigned cacheLiveResourcePriority() const { return m_cacheLiveResourcePrior ity; } 181 unsigned cacheLiveResourcePriority() const { return m_cacheLiveResourcePrior ity; }
182 bool inLiveDecodedResourcesList() { return m_inLiveDecodedResourcesList; } 182 bool inLiveDecodedResourcesList() { return m_inLiveDecodedResourcesList; }
183 183
184 void clearLoader(); 184 void clearLoader();
185 185
186 SharedBuffer* resourceBuffer() const { ASSERT(!m_purgeableData); return m_da ta.get(); } 186 SharedBuffer* resourceBuffer() const { ASSERT(!m_purgeableData); return m_da ta.get(); }
187 void setResourceBuffer(PassRefPtr<SharedBuffer>); 187 void setResourceBuffer(PassRefPtr<SharedBuffer>);
188 188
189 virtual void willSendRequest(ResourceRequest&, const ResourceResponse&) { m_ requestedFromNetworkingLayer = true; } 189 virtual void willSendRequest(ResourceRequest&, const ResourceResponse&) { m_ requestedFromNetworkingLayer = true; }
190 virtual void updateRequest(const ResourceRequest&) { }
190 virtual void responseReceived(const ResourceResponse&); 191 virtual void responseReceived(const ResourceResponse&);
191 void setResponse(const ResourceResponse& response) { m_response = response; } 192 void setResponse(const ResourceResponse& response) { m_response = response; }
192 const ResourceResponse& response() const { return m_response; } 193 const ResourceResponse& response() const { return m_response; }
193 194
194 // Sets the serialized metadata retrieved from the platform's cache. 195 // Sets the serialized metadata retrieved from the platform's cache.
195 void setSerializedCachedMetadata(const char*, size_t); 196 void setSerializedCachedMetadata(const char*, size_t);
196 197
197 // Caches the given metadata in association with this resource and suggests 198 // Caches the given metadata in association with this resource and suggests
198 // that the platform persist it. The dataTypeID is a pseudo-randomly chosen 199 // that the platform persist it. The dataTypeID is a pseudo-randomly chosen
199 // identifier that is used to distinguish data generated by the caller. 200 // identifier that is used to distinguish data generated by the caller.
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 const char* ResourceTypeName(Resource::Type); 397 const char* ResourceTypeName(Resource::Type);
397 #endif 398 #endif
398 399
399 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ 400 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \
400 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() = = Resource::typeName, resource.type() == Resource::typeName); \ 401 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() = = Resource::typeName, resource.type() == Resource::typeName); \
401 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource >& ptr) { return to##typeName##Resource(ptr.get()); } 402 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource >& ptr) { return to##typeName##Resource(ptr.get()); }
402 403
403 } 404 }
404 405
405 #endif 406 #endif
OLDNEW
« no previous file with comments | « Source/core/fetch/RawResource.cpp ('k') | Source/core/fetch/ResourceLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698