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

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

Issue 2827993002: ResourceFetcher: Refactor ResourceForStaticData().
Patch Set: ResourceFetcher: Refactor ResourceForStaticData(). Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 bool is_link_preload = false); 172 bool is_link_preload = false);
173 173
174 enum PrepareRequestResult { kAbort, kContinue, kBlock }; 174 enum PrepareRequestResult { kAbort, kContinue, kBlock };
175 175
176 PrepareRequestResult PrepareRequest(FetchParameters&, 176 PrepareRequestResult PrepareRequest(FetchParameters&,
177 const ResourceFactory&, 177 const ResourceFactory&,
178 const SubstituteData&, 178 const SubstituteData&,
179 unsigned long identifier, 179 unsigned long identifier,
180 ResourceRequestBlockedReason&); 180 ResourceRequestBlockedReason&);
181 181
182 Resource* ResourceForStaticData(const FetchParameters&, 182 Resource* ResourceForStaticDataFromCache(const FetchParameters&);
183 const ResourceFactory&, 183 Resource* ResourceForSubstituteData(const FetchParameters&,
184 const SubstituteData&); 184 const ResourceFactory&,
185 const SubstituteData&);
186 Resource* ResourceForDataUrl(const FetchParameters&,
187 const ResourceFactory&,
188 const SubstituteData&);
189 Resource* ResourceForArchive(const FetchParameters&,
190 const ResourceFactory&,
191 const SubstituteData&);
192 Resource* CreateResourceFromStaticData(const FetchParameters&,
193 const ResourceFactory&,
194 const ResourceResponse&,
195 const RefPtr<SharedBuffer>& data,
196 const SubstituteData&);
185 Resource* ResourceForBlockedRequest(const FetchParameters&, 197 Resource* ResourceForBlockedRequest(const FetchParameters&,
186 const ResourceFactory&, 198 const ResourceFactory&,
187 ResourceRequestBlockedReason); 199 ResourceRequestBlockedReason);
188 200
189 // RevalidationPolicy enum values are used in UMAs https://crbug.com/579496. 201 // RevalidationPolicy enum values are used in UMAs https://crbug.com/579496.
190 enum RevalidationPolicy { kUse, kRevalidate, kReload, kLoad }; 202 enum RevalidationPolicy { kUse, kRevalidate, kReload, kLoad };
191 RevalidationPolicy DetermineRevalidationPolicy(Resource::Type, 203 RevalidationPolicy DetermineRevalidationPolicy(Resource::Type,
192 const FetchParameters&, 204 const FetchParameters&,
193 Resource* existing_resource, 205 Resource* existing_resource,
194 bool is_static_data) const; 206 bool is_static_data) const;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 } 301 }
290 302
291 private: 303 private:
292 Member<ResourceFetcher> loader_; 304 Member<ResourceFetcher> loader_;
293 bool previous_state_; 305 bool previous_state_;
294 }; 306 };
295 307
296 } // namespace blink 308 } // namespace blink
297 309
298 #endif // ResourceFetcher_h 310 #endif // ResourceFetcher_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698