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

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

Issue 1710733002: Move multipart resource handling to core/fetch (2/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@multipart-cleanup
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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 ResourceLoader* loader() const { return m_loader.get(); } 169 ResourceLoader* loader() const { return m_loader.get(); }
170 170
171 virtual bool isImage() const { return false; } 171 virtual bool isImage() const { return false; }
172 bool shouldBlockLoadEvent() const; 172 bool shouldBlockLoadEvent() const;
173 bool isLoadEventBlockingResourceType() const; 173 bool isLoadEventBlockingResourceType() const;
174 174
175 // Computes the status of an object after loading. 175 // Computes the status of an object after loading.
176 // Updates the expire date on the cache entry file 176 // Updates the expire date on the cache entry file
177 void setLoadFinishTime(double finishTime) { m_loadFinishTime = finishTime; } 177 void setLoadFinishTime(double finishTime) { m_loadFinishTime = finishTime; }
178 void finish(); 178 virtual void finish();
179 179
180 // FIXME: Remove the stringless variant once all the callsites' error messag es are updated. 180 // FIXME: Remove the stringless variant once all the callsites' error messag es are updated.
181 bool passesAccessControlCheck(SecurityOrigin*) const; 181 bool passesAccessControlCheck(SecurityOrigin*) const;
182 bool passesAccessControlCheck(SecurityOrigin*, String& errorDescription) con st; 182 bool passesAccessControlCheck(SecurityOrigin*, String& errorDescription) con st;
183 183
184 bool isEligibleForIntegrityCheck(SecurityOrigin*) const; 184 bool isEligibleForIntegrityCheck(SecurityOrigin*) const;
185 185
186 void clearLoader(); 186 void clearLoader();
187 187
188 SharedBuffer* resourceBuffer() const { return m_data.get(); } 188 SharedBuffer* resourceBuffer() const { return m_data.get(); }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 #ifdef ENABLE_RESOURCE_IS_DELETED_CHECK 263 #ifdef ENABLE_RESOURCE_IS_DELETED_CHECK
264 void assertAlive() const { RELEASE_ASSERT(!m_deleted); } 264 void assertAlive() const { RELEASE_ASSERT(!m_deleted); }
265 #else 265 #else
266 void assertAlive() const { } 266 void assertAlive() const { }
267 #endif 267 #endif
268 268
269 protected: 269 protected:
270 Resource(const ResourceRequest&, Type); 270 Resource(const ResourceRequest&, Type);
271 271
272 virtual void checkNotify(); 272 virtual void checkNotify();
273 virtual void finishOnePart();
274 273
275 virtual void destroyDecodedDataForFailedRevalidation() { } 274 virtual void destroyDecodedDataForFailedRevalidation() { }
276 275
277 void setEncodedSize(size_t); 276 void setEncodedSize(size_t);
278 void setDecodedSize(size_t); 277 void setDecodedSize(size_t);
279 void didAccessDecodedData(); 278 void didAccessDecodedData();
280 279
281 void finishPendingClients(); 280 void finishPendingClients();
282 281
283 HashCountedSet<ResourceClient*> m_clients; 282 HashCountedSet<ResourceClient*> m_clients;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 Resource::Type m_type; 398 Resource::Type m_type;
400 }; 399 };
401 400
402 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ 401 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \
403 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType( ) == Resource::typeName, resource.getType() == Resource::typeName); \ 402 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType( ) == Resource::typeName, resource.getType() == Resource::typeName); \
404 inline typeName##Resource* to##typeName##Resource(const RefPtrWillBeRawPtr<R esource>& ptr) { return to##typeName##Resource(ptr.get()); } 403 inline typeName##Resource* to##typeName##Resource(const RefPtrWillBeRawPtr<R esource>& ptr) { return to##typeName##Resource(ptr.get()); }
405 404
406 } // namespace blink 405 } // namespace blink
407 406
408 #endif 407 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698