| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 201 |
| 202 void WebURLRequest::visitHTTPHeaderFields(WebHTTPHeaderVisitor* visitor) const | 202 void WebURLRequest::visitHTTPHeaderFields(WebHTTPHeaderVisitor* visitor) const |
| 203 { | 203 { |
| 204 const HTTPHeaderMap& map = m_private->m_resourceRequest->httpHeaderFields(); | 204 const HTTPHeaderMap& map = m_private->m_resourceRequest->httpHeaderFields(); |
| 205 for (HTTPHeaderMap::const_iterator it = map.begin(); it != map.end(); ++it) | 205 for (HTTPHeaderMap::const_iterator it = map.begin(); it != map.end(); ++it) |
| 206 visitor->visitHeader(it->key, it->value); | 206 visitor->visitHeader(it->key, it->value); |
| 207 } | 207 } |
| 208 | 208 |
| 209 WebHTTPBody WebURLRequest::httpBody() const | 209 WebHTTPBody WebURLRequest::httpBody() const |
| 210 { | 210 { |
| 211 // TODO(mkwst): This is wrong, as it means that we're producing the body | |
| 212 // before any ServiceWorker has a chance to operate, which means we're | |
| 213 // revealing data to the SW that we ought to be hiding. Baby steps. | |
| 214 // https://crbug.com/599597 | |
| 215 if (m_private->m_resourceRequest->attachedCredentialBody()) | |
| 216 return WebHTTPBody(m_private->m_resourceRequest->attachedCredentialBody(
)); | |
| 217 return WebHTTPBody(m_private->m_resourceRequest->httpBody()); | 211 return WebHTTPBody(m_private->m_resourceRequest->httpBody()); |
| 218 } | 212 } |
| 219 | 213 |
| 220 void WebURLRequest::setHTTPBody(const WebHTTPBody& httpBody) | 214 void WebURLRequest::setHTTPBody(const WebHTTPBody& httpBody) |
| 221 { | 215 { |
| 222 m_private->m_resourceRequest->setHTTPBody(httpBody); | 216 m_private->m_resourceRequest->setHTTPBody(httpBody); |
| 223 } | 217 } |
| 224 | 218 |
| 225 WebHTTPBody WebURLRequest::attachedCredentialBody() const | 219 WebHTTPBody WebURLRequest::attachedCredentialBody() const |
| 226 { | 220 { |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 // Subclasses may call this directly so a self-assignment check is needed | 480 // Subclasses may call this directly so a self-assignment check is needed |
| 487 // here as well as in the public assign method. | 481 // here as well as in the public assign method. |
| 488 if (m_private == p) | 482 if (m_private == p) |
| 489 return; | 483 return; |
| 490 if (m_private) | 484 if (m_private) |
| 491 m_private->dispose(); | 485 m_private->dispose(); |
| 492 m_private = p; | 486 m_private = p; |
| 493 } | 487 } |
| 494 | 488 |
| 495 } // namespace blink | 489 } // namespace blink |
| OLD | NEW |