Chromium Code Reviews

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

Issue 2616323002: CrossOriginAccessControl: separate access checks and error message generation (Closed)
Patch Set: initialize allowRedirect correctly Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 rights reserved. 6 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 196 matching lines...)
207 207
208 virtual bool isImage() const { return false; } 208 virtual bool isImage() const { return false; }
209 bool shouldBlockLoadEvent() const; 209 bool shouldBlockLoadEvent() const;
210 bool isLoadEventBlockingResourceType() const; 210 bool isLoadEventBlockingResourceType() const;
211 211
212 // Computes the status of an object after loading. Updates the expire date on 212 // Computes the status of an object after loading. Updates the expire date on
213 // the cache entry file 213 // the cache entry file
214 virtual void finish(double finishTime); 214 virtual void finish(double finishTime);
215 void finish() { finish(0.0); } 215 void finish() { finish(0.0); }
216 216
217 // FIXME: Remove the stringless variant once all the callsites' error messages
218 // are updated.
219 bool passesAccessControlCheck(SecurityOrigin*) const; 217 bool passesAccessControlCheck(SecurityOrigin*) const;
220 bool passesAccessControlCheck(SecurityOrigin*,
221 String& errorDescription) const;
222 218
223 virtual PassRefPtr<const SharedBuffer> resourceBuffer() const { 219 virtual PassRefPtr<const SharedBuffer> resourceBuffer() const {
224 return m_data; 220 return m_data;
225 } 221 }
226 void setResourceBuffer(PassRefPtr<SharedBuffer>); 222 void setResourceBuffer(PassRefPtr<SharedBuffer>);
227 223
228 virtual bool willFollowRedirect(const ResourceRequest&, 224 virtual bool willFollowRedirect(const ResourceRequest&,
229 const ResourceResponse&); 225 const ResourceResponse&);
230 226
231 // Called when a redirect response was received but a decision has already 227 // Called when a redirect response was received but a decision has already
(...skipping 282 matching lines...)
514 }; 510 };
515 511
516 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ 512 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \
517 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, \ 513 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, \
518 resource->getType() == Resource::typeName, \ 514 resource->getType() == Resource::typeName, \
519 resource.getType() == Resource::typeName); 515 resource.getType() == Resource::typeName);
520 516
521 } // namespace blink 517 } // namespace blink
522 518
523 #endif 519 #endif
OLDNEW

Powered by Google App Engine