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

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

Issue 2535383003: Collapse images disallowed by the Safe Browsing Subresource Filter. (Closed)
Patch Set: Rebase. Created 4 years 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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 4 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
5 rights reserved. 5 rights reserved.
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 void logPreloadStats(ClearPreloadsPolicy); 108 void logPreloadStats(ClearPreloadsPolicy);
109 void warnUnusedPreloads(); 109 void warnUnusedPreloads();
110 110
111 MHTMLArchive* archive() const { return m_archive.get(); } 111 MHTMLArchive* archive() const { return m_archive.get(); }
112 ArchiveResource* createArchive(Resource*); 112 ArchiveResource* createArchive(Resource*);
113 113
114 void setDefersLoading(bool); 114 void setDefersLoading(bool);
115 void stopFetching(); 115 void stopFetching();
116 bool isFetching() const; 116 bool isFetching() const;
117 117
118 bool willFollowRedirect(Resource*, ResourceRequest&, const ResourceResponse&); 118 ResourceRequestBlockedReason willFollowRedirect(Resource*,
119 ResourceRequest&,
120 const ResourceResponse&);
119 enum DidFinishLoadingReason { 121 enum DidFinishLoadingReason {
120 DidFinishLoading, 122 DidFinishLoading,
121 DidFinishFirstPartInMultipart 123 DidFinishFirstPartInMultipart
122 }; 124 };
123 void didFinishLoading(Resource*, 125 void didFinishLoading(Resource*,
124 double finishTime, 126 double finishTime,
125 DidFinishLoadingReason); 127 DidFinishLoadingReason);
126 void didFailLoading(Resource*, const ResourceError&); 128 void didFailLoading(Resource*, const ResourceError&);
127 void didReceiveResponse(Resource*, 129 void didReceiveResponse(Resource*,
128 const ResourceResponse&, 130 const ResourceResponse&,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 const ResourceFactory&); 175 const ResourceFactory&);
174 void storeResourceTimingInitiatorInformation(Resource*); 176 void storeResourceTimingInitiatorInformation(Resource*);
175 ResourceLoadPriority computeLoadPriority(Resource::Type, 177 ResourceLoadPriority computeLoadPriority(Resource::Type,
176 const FetchRequest&, 178 const FetchRequest&,
177 ResourcePriority::VisibilityStatus); 179 ResourcePriority::VisibilityStatus);
178 180
179 Resource* resourceForStaticData(const FetchRequest&, 181 Resource* resourceForStaticData(const FetchRequest&,
180 const ResourceFactory&, 182 const ResourceFactory&,
181 const SubstituteData&); 183 const SubstituteData&);
182 Resource* resourceForBlockedRequest(const FetchRequest&, 184 Resource* resourceForBlockedRequest(const FetchRequest&,
183 const ResourceFactory&); 185 const ResourceFactory&,
186 ResourceRequestBlockedReason);
184 187
185 // RevalidationPolicy enum values are used in UMAs https://crbug.com/579496. 188 // RevalidationPolicy enum values are used in UMAs https://crbug.com/579496.
186 enum RevalidationPolicy { Use, Revalidate, Reload, Load }; 189 enum RevalidationPolicy { Use, Revalidate, Reload, Load };
187 RevalidationPolicy determineRevalidationPolicy(Resource::Type, 190 RevalidationPolicy determineRevalidationPolicy(Resource::Type,
188 const FetchRequest&, 191 const FetchRequest&,
189 Resource* existingResource, 192 Resource* existingResource,
190 bool isStaticData) const; 193 bool isStaticData) const;
191 194
192 void moveCachedNonBlockingResourceToBlocking(Resource*, const FetchRequest&); 195 void moveCachedNonBlockingResourceToBlocking(Resource*, const FetchRequest&);
193 void moveResourceLoaderToNonBlocking(ResourceLoader*); 196 void moveResourceLoaderToNonBlocking(ResourceLoader*);
194 void removeResourceLoader(ResourceLoader*); 197 void removeResourceLoader(ResourceLoader*);
195 198
196 void initializeResourceRequest(ResourceRequest&, 199 void initializeResourceRequest(ResourceRequest&,
197 Resource::Type, 200 Resource::Type,
198 FetchRequest::DeferOption); 201 FetchRequest::DeferOption);
199 void willSendRequest(unsigned long identifier, 202 void willSendRequest(unsigned long identifier,
200 ResourceRequest&, 203 ResourceRequest&,
201 const ResourceResponse&, 204 const ResourceResponse&,
202 const ResourceLoaderOptions&); 205 const ResourceLoaderOptions&);
203 bool canAccessResponse(Resource*, const ResourceResponse&) const; 206 ResourceRequestBlockedReason canAccessResponse(Resource*,
207 const ResourceResponse&) const;
204 208
205 void requestLoadStarted(unsigned long identifier, 209 void requestLoadStarted(unsigned long identifier,
206 Resource*, 210 Resource*,
207 const FetchRequest&, 211 const FetchRequest&,
208 ResourceLoadStartType, 212 ResourceLoadStartType,
209 bool isStaticData = false); 213 bool isStaticData = false);
210 214
211 bool resourceNeedsLoad(Resource*, const FetchRequest&, RevalidationPolicy); 215 bool resourceNeedsLoad(Resource*, const FetchRequest&, RevalidationPolicy);
212 bool shouldDeferImageLoad(const KURL&) const; 216 bool shouldDeferImageLoad(const KURL&) const;
213 217
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 } 288 }
285 289
286 private: 290 private:
287 Member<ResourceFetcher> m_loader; 291 Member<ResourceFetcher> m_loader;
288 bool m_previousState; 292 bool m_previousState;
289 }; 293 };
290 294
291 } // namespace blink 295 } // namespace blink
292 296
293 #endif // ResourceFetcher_h 297 #endif // ResourceFetcher_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/MockFetchContext.h ('k') | third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698