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

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

Issue 2742933002: Refactor determineRequestContext() to remove a mutableResourceRequest() call (Closed)
Patch Set: Created 3 years, 9 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) 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 bool isControlledByServiceWorker() const; 124 bool isControlledByServiceWorker() const;
125 125
126 enum ResourceLoadStartType { 126 enum ResourceLoadStartType {
127 ResourceLoadingFromNetwork, 127 ResourceLoadingFromNetwork,
128 ResourceLoadingFromCache 128 ResourceLoadingFromCache
129 }; 129 };
130 static const ResourceLoaderOptions& defaultResourceOptions(); 130 static const ResourceLoaderOptions& defaultResourceOptions();
131 131
132 String getCacheIdentifier() const; 132 String getCacheIdentifier() const;
133 133
134 static void determineRequestContext(ResourceRequest&, 134 WARN_UNUSED_RESULT static WebURLRequest::RequestContext
135 Resource::Type, 135 determineRequestContext(Resource::Type, bool isMainFrame);
136 bool isMainFrame); 136 WARN_UNUSED_RESULT WebURLRequest::RequestContext determineRequestContext(
137 void determineRequestContext(ResourceRequest&, Resource::Type); 137 Resource::Type) const;
138 138
139 void updateAllImageResourcePriorities(); 139 void updateAllImageResourcePriorities();
140 140
141 void reloadLoFiImages(); 141 void reloadLoFiImages();
142 142
143 // Calling this method before main document resource is fetched is invalid. 143 // Calling this method before main document resource is fetched is invalid.
144 ResourceTimingInfo* getNavigationTimingInfo(); 144 ResourceTimingInfo* getNavigationTimingInfo();
145 145
146 // This is only exposed for testing purposes. 146 // This is only exposed for testing purposes.
147 HeapListHashSet<Member<Resource>>* preloads() { return m_preloads.get(); } 147 HeapListHashSet<Member<Resource>>* preloads() { return m_preloads.get(); }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 } 283 }
284 284
285 private: 285 private:
286 Member<ResourceFetcher> m_loader; 286 Member<ResourceFetcher> m_loader;
287 bool m_previousState; 287 bool m_previousState;
288 }; 288 };
289 289
290 } // namespace blink 290 } // namespace blink
291 291
292 #endif // ResourceFetcher_h 292 #endif // ResourceFetcher_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698