OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. |
3 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 void ResourceRequest::setHTTPHeaderField(const AtomicString& name, const AtomicS
tring& value) | 179 void ResourceRequest::setHTTPHeaderField(const AtomicString& name, const AtomicS
tring& value) |
180 { | 180 { |
181 m_httpHeaderFields.set(name, value); | 181 m_httpHeaderFields.set(name, value); |
182 } | 182 } |
183 | 183 |
184 void ResourceRequest::setHTTPHeaderField(const char* name, const AtomicString& v
alue) | 184 void ResourceRequest::setHTTPHeaderField(const char* name, const AtomicString& v
alue) |
185 { | 185 { |
186 setHTTPHeaderField(AtomicString(name), value); | 186 setHTTPHeaderField(AtomicString(name), value); |
187 } | 187 } |
188 | 188 |
| 189 void ResourceRequest::setHTTPReferrer(const Referrer& referrer) |
| 190 { |
| 191 if (referrer.referrer.isEmpty()) |
| 192 m_httpHeaderFields.remove("Referer"); |
| 193 else |
| 194 setHTTPHeaderField("Referer", referrer.referrer); |
| 195 m_referrerPolicy = referrer.referrerPolicy; |
| 196 } |
| 197 |
189 void ResourceRequest::clearHTTPAuthorization() | 198 void ResourceRequest::clearHTTPAuthorization() |
190 { | 199 { |
191 m_httpHeaderFields.remove("Authorization"); | 200 m_httpHeaderFields.remove("Authorization"); |
192 } | 201 } |
193 | 202 |
194 void ResourceRequest::clearHTTPReferrer() | 203 void ResourceRequest::clearHTTPReferrer() |
195 { | 204 { |
196 m_httpHeaderFields.remove("Referer"); | 205 m_httpHeaderFields.remove("Referer"); |
197 m_referrerPolicy = ReferrerPolicyDefault; | 206 m_referrerPolicy = ReferrerPolicyDefault; |
198 } | 207 } |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 // This is used by the loader to control the number of issued parallel load requ
ests. | 426 // This is used by the loader to control the number of issued parallel load requ
ests. |
418 unsigned initializeMaximumHTTPConnectionCountPerHost() | 427 unsigned initializeMaximumHTTPConnectionCountPerHost() |
419 { | 428 { |
420 // The chromium network stack already handles limiting the number of | 429 // The chromium network stack already handles limiting the number of |
421 // parallel requests per host, so there's no need to do it here. Therefore, | 430 // parallel requests per host, so there's no need to do it here. Therefore, |
422 // this is set to a high value that should never be hit in practice. | 431 // this is set to a high value that should never be hit in practice. |
423 return 10000; | 432 return 10000; |
424 } | 433 } |
425 | 434 |
426 } | 435 } |
OLD | NEW |