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

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: Created 6 years, 6 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 ResourceLoader* loader() const { return m_loader.get(); } 148 ResourceLoader* loader() const { return m_loader.get(); }
148 149
149 virtual bool isImage() const { return false; } 150 virtual bool isImage() const { return false; }
150 bool ignoreForRequestCount() const 151 bool ignoreForRequestCount() const
151 { 152 {
152 return type() == MainResource 153 return type() == MainResource
153 || type() == LinkPrefetch 154 || type() == LinkPrefetch
154 || type() == LinkSubresource 155 || type() == LinkSubresource
155 || type() == Media 156 || type() == Media
156 || type() == Raw 157 || type() == Raw
157 || type() == TextTrack; 158 || type() == TextTrack
159 || type() == Manifest;
158 } 160 }
159 161
160 // Computes the status of an object after loading. 162 // Computes the status of an object after loading.
161 // Updates the expire date on the cache entry file 163 // Updates the expire date on the cache entry file
162 void finish(double finishTime = 0.0); 164 void finish(double finishTime = 0.0);
163 165
164 // FIXME: Remove the stringless variant once all the callsites' error messag es are updated. 166 // FIXME: Remove the stringless variant once all the callsites' error messag es are updated.
165 bool passesAccessControlCheck(SecurityOrigin*); 167 bool passesAccessControlCheck(SecurityOrigin*);
166 bool passesAccessControlCheck(SecurityOrigin*, String& errorDescription); 168 bool passesAccessControlCheck(SecurityOrigin*, String& errorDescription);
167 169
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 const char* ResourceTypeName(Resource::Type); 395 const char* ResourceTypeName(Resource::Type);
394 #endif 396 #endif
395 397
396 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ 398 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \
397 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() = = Resource::typeName, resource.type() == Resource::typeName); \ 399 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() = = Resource::typeName, resource.type() == Resource::typeName); \
398 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource >& ptr) { return to##typeName##Resource(ptr.get()); } 400 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource >& ptr) { return to##typeName##Resource(ptr.get()); }
399 401
400 } 402 }
401 403
402 #endif 404 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698