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

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

Issue 2454983002: Cache-aware Resource loading (Closed)
Patch Set: nit Created 4 years, 1 month 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/core/fetch/Resource.h » ('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) 2012 Google, Inc. All rights reserved. 2 * Copyright (C) 2012 Google, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 return m_options.contentSecurityPolicyNonce; 118 return m_options.contentSecurityPolicyNonce;
119 } 119 }
120 void setContentSecurityPolicyNonce(const String& nonce) { 120 void setContentSecurityPolicyNonce(const String& nonce) {
121 m_options.contentSecurityPolicyNonce = nonce; 121 m_options.contentSecurityPolicyNonce = nonce;
122 } 122 }
123 123
124 void setParserDisposition(ParserDisposition parserDisposition) { 124 void setParserDisposition(ParserDisposition parserDisposition) {
125 m_options.parserDisposition = parserDisposition; 125 m_options.parserDisposition = parserDisposition;
126 } 126 }
127 127
128 void setCacheAwareLoadingEnabled(
129 CacheAwareLoadingEnabled cacheAwareLoadingEnabled) {
130 m_options.cacheAwareLoadingEnabled = cacheAwareLoadingEnabled;
131 }
132
128 void makeSynchronous(); 133 void makeSynchronous();
129 134
130 PlaceholderImageRequestType placeholderImageRequestType() const { 135 PlaceholderImageRequestType placeholderImageRequestType() const {
131 return m_placeholderImageRequestType; 136 return m_placeholderImageRequestType;
132 } 137 }
133 138
134 // Configures the request to load an image placeholder if the request is 139 // Configures the request to load an image placeholder if the request is
135 // eligible (e.g. the url's protocol is HTTP, etc.). If this request is 140 // eligible (e.g. the url's protocol is HTTP, etc.). If this request is
136 // non-eligible, this method doesn't modify the ResourceRequest. Calling this 141 // non-eligible, this method doesn't modify the ResourceRequest. Calling this
137 // method sets m_placeholderImageRequestType to the appropriate value. 142 // method sets m_placeholderImageRequestType to the appropriate value.
138 void setAllowImagePlaceholder(); 143 void setAllowImagePlaceholder();
139 144
140 private: 145 private:
141 ResourceRequest m_resourceRequest; 146 ResourceRequest m_resourceRequest;
142 String m_charset; 147 String m_charset;
143 ResourceLoaderOptions m_options; 148 ResourceLoaderOptions m_options;
144 bool m_forPreload; 149 bool m_forPreload;
145 bool m_linkPreload; 150 bool m_linkPreload;
146 double m_preloadDiscoveryTime; 151 double m_preloadDiscoveryTime;
147 DeferOption m_defer; 152 DeferOption m_defer;
148 OriginRestriction m_originRestriction; 153 OriginRestriction m_originRestriction;
149 ResourceWidth m_resourceWidth; 154 ResourceWidth m_resourceWidth;
150 ClientHintsPreferences m_clientHintPreferences; 155 ClientHintsPreferences m_clientHintPreferences;
151 PlaceholderImageRequestType m_placeholderImageRequestType; 156 PlaceholderImageRequestType m_placeholderImageRequestType;
152 }; 157 };
153 158
154 } // namespace blink 159 } // namespace blink
155 160
156 #endif 161 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/Resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698