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

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, 7 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 Shader, 73 Shader,
74 ImportResource, 74 ImportResource,
75 Media // Audio or video file requested by a HTML5 media element 75 Media, // Audio or video file requested by a HTML5 media element
76 Manifest
76 }; 77 };
77 78
78 enum Status { 79 enum Status {
79 Unknown, // let cache decide what to do with it 80 Unknown, // let cache decide what to do with it
80 Pending, // only partially loaded 81 Pending, // only partially loaded
81 Cached, // regular case 82 Cached, // regular case
82 LoadError, 83 LoadError,
83 DecodeError 84 DecodeError
84 }; 85 };
85 86
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 ResourceLoader* loader() const { return m_loader.get(); } 149 ResourceLoader* loader() const { return m_loader.get(); }
149 150
150 virtual bool isImage() const { return false; } 151 virtual bool isImage() const { return false; }
151 bool ignoreForRequestCount() const 152 bool ignoreForRequestCount() const
152 { 153 {
153 return type() == MainResource 154 return type() == MainResource
154 || type() == LinkPrefetch 155 || type() == LinkPrefetch
155 || type() == LinkSubresource 156 || type() == LinkSubresource
156 || type() == Media 157 || type() == Media
157 || type() == Raw 158 || type() == Raw
158 || type() == TextTrack; 159 || type() == TextTrack
160 || type() == Manifest;
159 } 161 }
160 162
161 // Computes the status of an object after loading. 163 // Computes the status of an object after loading.
162 // Updates the expire date on the cache entry file 164 // Updates the expire date on the cache entry file
163 void finish(double finishTime = 0.0); 165 void finish(double finishTime = 0.0);
164 166
165 // FIXME: Remove the stringless variant once all the callsites' error messag es are updated. 167 // FIXME: Remove the stringless variant once all the callsites' error messag es are updated.
166 bool passesAccessControlCheck(SecurityOrigin*); 168 bool passesAccessControlCheck(SecurityOrigin*);
167 bool passesAccessControlCheck(SecurityOrigin*, String& errorDescription); 169 bool passesAccessControlCheck(SecurityOrigin*, String& errorDescription);
168 170
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 const char* ResourceTypeName(Resource::Type); 396 const char* ResourceTypeName(Resource::Type);
395 #endif 397 #endif
396 398
397 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ 399 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \
398 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() = = Resource::typeName, resource.type() == Resource::typeName); \ 400 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() = = Resource::typeName, resource.type() == Resource::typeName); \
399 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource >& ptr) { return to##typeName##Resource(ptr.get()); } 401 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource >& ptr) { return to##typeName##Resource(ptr.get()); }
400 402
401 } 403 }
402 404
403 #endif 405 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698