OLD | NEW |
---|---|
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
83 } | 83 } |
84 const KURL& Url() const { return resource_request_.Url(); } | 84 const KURL& Url() const { return resource_request_.Url(); } |
85 | 85 |
86 void SetRequestContext(WebURLRequest::RequestContext context) { | 86 void SetRequestContext(WebURLRequest::RequestContext context) { |
87 resource_request_.SetRequestContext(context); | 87 resource_request_.SetRequestContext(context); |
88 } | 88 } |
89 | 89 |
90 const String& Charset() const { return charset_; } | 90 const String& Charset() const { return charset_; } |
91 void SetCharset(const String& charset) { charset_ = charset; } | 91 void SetCharset(const String& charset) { charset_ = charset; } |
92 | 92 |
93 const String& IntegrityValue() const { return integrity_; } | |
shimazu
2017/06/26 06:13:32
I guess it's not used.
yhirano
2017/06/28 04:55:09
Please remove these and use ResourceRequest member
xiaofengzhang
2017/06/29 02:26:06
Yes, Done.
| |
94 void SetIntegrityValue(const String& integrity) { integrity_ = integrity; } | |
95 | |
93 const ResourceLoaderOptions& Options() const { return options_; } | 96 const ResourceLoaderOptions& Options() const { return options_; } |
94 | 97 |
95 DeferOption Defer() const { return defer_; } | 98 DeferOption Defer() const { return defer_; } |
96 void SetDefer(DeferOption defer) { defer_ = defer; } | 99 void SetDefer(DeferOption defer) { defer_ = defer; } |
97 | 100 |
98 ResourceWidth GetResourceWidth() const { return resource_width_; } | 101 ResourceWidth GetResourceWidth() const { return resource_width_; } |
99 void SetResourceWidth(ResourceWidth); | 102 void SetResourceWidth(ResourceWidth); |
100 | 103 |
101 ClientHintsPreferences& GetClientHintsPreferences() { | 104 ClientHintsPreferences& GetClientHintsPreferences() { |
102 return client_hint_preferences_; | 105 return client_hint_preferences_; |
(...skipping 21 matching lines...) Expand all Loading... | |
124 } | 127 } |
125 void SetCrossOriginAccessControl(SecurityOrigin*, CrossOriginAttributeValue); | 128 void SetCrossOriginAccessControl(SecurityOrigin*, CrossOriginAttributeValue); |
126 OriginRestriction GetOriginRestriction() const { return origin_restriction_; } | 129 OriginRestriction GetOriginRestriction() const { return origin_restriction_; } |
127 void SetOriginRestriction(OriginRestriction restriction) { | 130 void SetOriginRestriction(OriginRestriction restriction) { |
128 origin_restriction_ = restriction; | 131 origin_restriction_ = restriction; |
129 } | 132 } |
130 const IntegrityMetadataSet IntegrityMetadata() const { | 133 const IntegrityMetadataSet IntegrityMetadata() const { |
131 return options_.integrity_metadata; | 134 return options_.integrity_metadata; |
132 } | 135 } |
133 void SetIntegrityMetadata(const IntegrityMetadataSet& metadata) { | 136 void SetIntegrityMetadata(const IntegrityMetadataSet& metadata) { |
134 options_.integrity_metadata = metadata; | 137 options_.integrity_metadata = metadata; |
shimazu
2017/06/26 06:13:32
You can set the attribute to |resource_request_| h
xiaofengzhang
2017/06/29 02:26:06
As I comment in ScriptLoader.cpp, I think get the
| |
135 } | 138 } |
136 | 139 |
137 String ContentSecurityPolicyNonce() const { | 140 String ContentSecurityPolicyNonce() const { |
138 return options_.content_security_policy_nonce; | 141 return options_.content_security_policy_nonce; |
139 } | 142 } |
140 void SetContentSecurityPolicyNonce(const String& nonce) { | 143 void SetContentSecurityPolicyNonce(const String& nonce) { |
141 options_.content_security_policy_nonce = nonce; | 144 options_.content_security_policy_nonce = nonce; |
142 } | 145 } |
143 | 146 |
144 void SetParserDisposition(ParserDisposition parser_disposition) { | 147 void SetParserDisposition(ParserDisposition parser_disposition) { |
(...skipping 13 matching lines...) Expand all Loading... | |
158 | 161 |
159 // Configures the request to load an image placeholder if the request is | 162 // Configures the request to load an image placeholder if the request is |
160 // eligible (e.g. the url's protocol is HTTP, etc.). If this request is | 163 // eligible (e.g. the url's protocol is HTTP, etc.). If this request is |
161 // non-eligible, this method doesn't modify the ResourceRequest. Calling this | 164 // non-eligible, this method doesn't modify the ResourceRequest. Calling this |
162 // method sets m_placeholderImageRequestType to the appropriate value. | 165 // method sets m_placeholderImageRequestType to the appropriate value. |
163 void SetAllowImagePlaceholder(); | 166 void SetAllowImagePlaceholder(); |
164 | 167 |
165 private: | 168 private: |
166 ResourceRequest resource_request_; | 169 ResourceRequest resource_request_; |
167 String charset_; | 170 String charset_; |
171 String integrity_; | |
shimazu
2017/06/26 06:13:32
I think we don't need to keep the |integrity_| val
xiaofengzhang
2017/06/29 02:26:06
Done.
| |
168 ResourceLoaderOptions options_; | 172 ResourceLoaderOptions options_; |
169 SpeculativePreloadType speculative_preload_type_; | 173 SpeculativePreloadType speculative_preload_type_; |
170 double preload_discovery_time_; | 174 double preload_discovery_time_; |
171 DeferOption defer_; | 175 DeferOption defer_; |
172 OriginRestriction origin_restriction_; | 176 OriginRestriction origin_restriction_; |
173 ResourceWidth resource_width_; | 177 ResourceWidth resource_width_; |
174 ClientHintsPreferences client_hint_preferences_; | 178 ClientHintsPreferences client_hint_preferences_; |
175 PlaceholderImageRequestType placeholder_image_request_type_; | 179 PlaceholderImageRequestType placeholder_image_request_type_; |
176 }; | 180 }; |
177 | 181 |
178 } // namespace blink | 182 } // namespace blink |
179 | 183 |
180 #endif | 184 #endif |
OLD | NEW |