| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 m_resourceRequest->clearHTTPHeaderField(name); | 203 m_resourceRequest->clearHTTPHeaderField(name); |
| 204 } | 204 } |
| 205 | 205 |
| 206 void WebURLRequest::visitHTTPHeaderFields(WebHTTPHeaderVisitor* visitor) const | 206 void WebURLRequest::visitHTTPHeaderFields(WebHTTPHeaderVisitor* visitor) const |
| 207 { | 207 { |
| 208 const HTTPHeaderMap& map = m_resourceRequest->httpHeaderFields(); | 208 const HTTPHeaderMap& map = m_resourceRequest->httpHeaderFields(); |
| 209 for (HTTPHeaderMap::const_iterator it = map.begin(); it != map.end(); ++it) | 209 for (HTTPHeaderMap::const_iterator it = map.begin(); it != map.end(); ++it) |
| 210 visitor->visitHeader(it->key, it->value); | 210 visitor->visitHeader(it->key, it->value); |
| 211 } | 211 } |
| 212 | 212 |
| 213 WebString WebURLRequest::defaultHTTPUserAgent() const |
| 214 { |
| 215 return m_resourceRequest->defaultHTTPUserAgent(); |
| 216 } |
| 217 |
| 213 WebHTTPBody WebURLRequest::httpBody() const | 218 WebHTTPBody WebURLRequest::httpBody() const |
| 214 { | 219 { |
| 215 // TODO(mkwst): This is wrong, as it means that we're producing the body | 220 // TODO(mkwst): This is wrong, as it means that we're producing the body |
| 216 // before any ServiceWorker has a chance to operate, which means we're | 221 // before any ServiceWorker has a chance to operate, which means we're |
| 217 // revealing data to the SW that we ought to be hiding. Baby steps. | 222 // revealing data to the SW that we ought to be hiding. Baby steps. |
| 218 // https://crbug.com/599597 | 223 // https://crbug.com/599597 |
| 219 if (m_resourceRequest->attachedCredential()) | 224 if (m_resourceRequest->attachedCredential()) |
| 220 return WebHTTPBody(m_resourceRequest->attachedCredential()); | 225 return WebHTTPBody(m_resourceRequest->attachedCredential()); |
| 221 return WebHTTPBody(m_resourceRequest->httpBody()); | 226 return WebHTTPBody(m_resourceRequest->httpBody()); |
| 222 } | 227 } |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 DCHECK(m_resourceRequest); | 492 DCHECK(m_resourceRequest); |
| 488 return *m_resourceRequest; | 493 return *m_resourceRequest; |
| 489 } | 494 } |
| 490 | 495 |
| 491 WebURLRequest::WebURLRequest(ResourceRequest& r) | 496 WebURLRequest::WebURLRequest(ResourceRequest& r) |
| 492 : m_resourceRequest(&r) | 497 : m_resourceRequest(&r) |
| 493 { | 498 { |
| 494 } | 499 } |
| 495 | 500 |
| 496 } // namespace blink | 501 } // namespace blink |
| OLD | NEW |