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

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

Issue 295063002: [NotLanded] Implement the fetching algorithm of the Web Manifest. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 4 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 CSSStyleSheet, 64 CSSStyleSheet,
65 Script, 65 Script,
66 Font, 66 Font,
67 Raw, 67 Raw,
68 SVGDocument, 68 SVGDocument,
69 XSLStyleSheet, 69 XSLStyleSheet,
70 LinkPrefetch, 70 LinkPrefetch,
71 LinkSubresource, 71 LinkSubresource,
72 TextTrack, 72 TextTrack,
73 ImportResource, 73 ImportResource,
74 Media // Audio or video file requested by a HTML5 media element 74 Media, // Audio or video file requested by a HTML5 media element
75 Manifest
75 }; 76 };
76 77
77 enum Status { 78 enum Status {
78 Unknown, // let cache decide what to do with it 79 Unknown, // let cache decide what to do with it
79 Pending, // only partially loaded 80 Pending, // only partially loaded
80 Cached, // regular case 81 Cached, // regular case
81 LoadError, 82 LoadError,
82 DecodeError 83 DecodeError
83 }; 84 };
84 85
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 ResourceLoader* loader() const { return m_loader.get(); } 157 ResourceLoader* loader() const { return m_loader.get(); }
157 158
158 virtual bool isImage() const { return false; } 159 virtual bool isImage() const { return false; }
159 bool ignoreForRequestCount() const 160 bool ignoreForRequestCount() const
160 { 161 {
161 return type() == MainResource 162 return type() == MainResource
162 || type() == LinkPrefetch 163 || type() == LinkPrefetch
163 || type() == LinkSubresource 164 || type() == LinkSubresource
164 || type() == Media 165 || type() == Media
165 || type() == Raw 166 || type() == Raw
166 || type() == TextTrack; 167 || type() == TextTrack
168 || type() == Manifest;
167 } 169 }
168 170
169 // Computes the status of an object after loading. 171 // Computes the status of an object after loading.
170 // Updates the expire date on the cache entry file 172 // Updates the expire date on the cache entry file
171 void finish(double finishTime = 0.0); 173 void finish(double finishTime = 0.0);
172 174
173 // FIXME: Remove the stringless variant once all the callsites' error messag es are updated. 175 // FIXME: Remove the stringless variant once all the callsites' error messag es are updated.
174 bool passesAccessControlCheck(SecurityOrigin*); 176 bool passesAccessControlCheck(SecurityOrigin*);
175 bool passesAccessControlCheck(SecurityOrigin*, String& errorDescription); 177 bool passesAccessControlCheck(SecurityOrigin*, String& errorDescription);
176 178
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 const char* ResourceTypeName(Resource::Type); 405 const char* ResourceTypeName(Resource::Type);
404 #endif 406 #endif
405 407
406 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ 408 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \
407 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() = = Resource::typeName, resource.type() == Resource::typeName); \ 409 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() = = Resource::typeName, resource.type() == Resource::typeName); \
408 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource >& ptr) { return to##typeName##Resource(ptr.get()); } 410 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource >& ptr) { return to##typeName##Resource(ptr.get()); }
409 411
410 } 412 }
411 413
412 #endif 414 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698