| 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 void ResourceRequest::SetPriority(ResourceLoadPriority priority, | 321 void ResourceRequest::SetPriority(ResourceLoadPriority priority, |
| 322 int intra_priority_value) { | 322 int intra_priority_value) { |
| 323 priority_ = priority; | 323 priority_ = priority; |
| 324 intra_priority_value_ = intra_priority_value; | 324 intra_priority_value_ = intra_priority_value; |
| 325 } | 325 } |
| 326 | 326 |
| 327 void ResourceRequest::AddHTTPHeaderField(const AtomicString& name, | 327 void ResourceRequest::AddHTTPHeaderField(const AtomicString& name, |
| 328 const AtomicString& value) { | 328 const AtomicString& value) { |
| 329 HTTPHeaderMap::AddResult result = http_header_fields_.Add(name, value); | 329 HTTPHeaderMap::AddResult result = http_header_fields_.Add(name, value); |
| 330 if (!result.is_new_entry) | 330 if (!result.is_new_entry) |
| 331 result.stored_value->value = result.stored_value->value + ',' + value; | 331 result.stored_value->value = result.stored_value->value + ", " + value; |
| 332 } | 332 } |
| 333 | 333 |
| 334 void ResourceRequest::AddHTTPHeaderFields(const HTTPHeaderMap& header_fields) { | 334 void ResourceRequest::AddHTTPHeaderFields(const HTTPHeaderMap& header_fields) { |
| 335 HTTPHeaderMap::const_iterator end = header_fields.end(); | 335 HTTPHeaderMap::const_iterator end = header_fields.end(); |
| 336 for (HTTPHeaderMap::const_iterator it = header_fields.begin(); it != end; | 336 for (HTTPHeaderMap::const_iterator it = header_fields.begin(); it != end; |
| 337 ++it) | 337 ++it) |
| 338 AddHTTPHeaderField(it->key, it->value); | 338 AddHTTPHeaderField(it->key, it->value); |
| 339 } | 339 } |
| 340 | 340 |
| 341 void ResourceRequest::ClearHTTPHeaderField(const AtomicString& name) { | 341 void ResourceRequest::ClearHTTPHeaderField(const AtomicString& name) { |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 // layer. | 418 // layer. |
| 419 if (HttpMethod() == HTTPNames::GET || HttpMethod() == HTTPNames::HEAD) | 419 if (HttpMethod() == HTTPNames::GET || HttpMethod() == HTTPNames::HEAD) |
| 420 return false; | 420 return false; |
| 421 | 421 |
| 422 // For non-GET and non-HEAD methods, always send an Origin header so the | 422 // For non-GET and non-HEAD methods, always send an Origin header so the |
| 423 // server knows we support this feature. | 423 // server knows we support this feature. |
| 424 return true; | 424 return true; |
| 425 } | 425 } |
| 426 | 426 |
| 427 } // namespace blink | 427 } // namespace blink |
| OLD | NEW |