| 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 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "public/platform/WebURLRequest.h" | 31 #include "public/platform/WebURLRequest.h" |
| 32 | 32 |
| 33 #include "platform/exported/WebURLRequestPrivate.h" | 33 #include "platform/exported/WebURLRequestPrivate.h" |
| 34 #include "platform/network/ResourceRequest.h" | 34 #include "platform/network/ResourceRequest.h" |
| 35 #include "public/platform/WebCachePolicy.h" |
| 35 #include "public/platform/WebHTTPBody.h" | 36 #include "public/platform/WebHTTPBody.h" |
| 36 #include "public/platform/WebHTTPHeaderVisitor.h" | 37 #include "public/platform/WebHTTPHeaderVisitor.h" |
| 37 #include "public/platform/WebSecurityOrigin.h" | 38 #include "public/platform/WebSecurityOrigin.h" |
| 38 #include "public/platform/WebURL.h" | 39 #include "public/platform/WebURL.h" |
| 39 #include "wtf/Allocator.h" | 40 #include "wtf/Allocator.h" |
| 40 #include "wtf/Noncopyable.h" | 41 #include "wtf/Noncopyable.h" |
| 41 | 42 |
| 42 namespace blink { | 43 namespace blink { |
| 43 | 44 |
| 44 namespace { | 45 namespace { |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 bool WebURLRequest::allowStoredCredentials() const | 141 bool WebURLRequest::allowStoredCredentials() const |
| 141 { | 142 { |
| 142 return m_private->m_resourceRequest->allowStoredCredentials(); | 143 return m_private->m_resourceRequest->allowStoredCredentials(); |
| 143 } | 144 } |
| 144 | 145 |
| 145 void WebURLRequest::setAllowStoredCredentials(bool allowStoredCredentials) | 146 void WebURLRequest::setAllowStoredCredentials(bool allowStoredCredentials) |
| 146 { | 147 { |
| 147 m_private->m_resourceRequest->setAllowStoredCredentials(allowStoredCredentia
ls); | 148 m_private->m_resourceRequest->setAllowStoredCredentials(allowStoredCredentia
ls); |
| 148 } | 149 } |
| 149 | 150 |
| 150 WebURLRequest::CachePolicy WebURLRequest::getCachePolicy() const | 151 WebCachePolicy WebURLRequest::getCachePolicy() const |
| 151 { | 152 { |
| 152 return static_cast<WebURLRequest::CachePolicy>( | 153 return m_private->m_resourceRequest->getCachePolicy(); |
| 153 m_private->m_resourceRequest->getCachePolicy()); | |
| 154 } | 154 } |
| 155 | 155 |
| 156 void WebURLRequest::setCachePolicy(CachePolicy cachePolicy) | 156 void WebURLRequest::setCachePolicy(WebCachePolicy cachePolicy) |
| 157 { | 157 { |
| 158 m_private->m_resourceRequest->setCachePolicy( | 158 m_private->m_resourceRequest->setCachePolicy(cachePolicy); |
| 159 static_cast<ResourceRequestCachePolicy>(cachePolicy)); | |
| 160 } | 159 } |
| 161 | 160 |
| 162 WebString WebURLRequest::httpMethod() const | 161 WebString WebURLRequest::httpMethod() const |
| 163 { | 162 { |
| 164 return m_private->m_resourceRequest->httpMethod(); | 163 return m_private->m_resourceRequest->httpMethod(); |
| 165 } | 164 } |
| 166 | 165 |
| 167 void WebURLRequest::setHTTPMethod(const WebString& httpMethod) | 166 void WebURLRequest::setHTTPMethod(const WebString& httpMethod) |
| 168 { | 167 { |
| 169 m_private->m_resourceRequest->setHTTPMethod(httpMethod); | 168 m_private->m_resourceRequest->setHTTPMethod(httpMethod); |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 // Subclasses may call this directly so a self-assignment check is needed | 485 // Subclasses may call this directly so a self-assignment check is needed |
| 487 // here as well as in the public assign method. | 486 // here as well as in the public assign method. |
| 488 if (m_private == p) | 487 if (m_private == p) |
| 489 return; | 488 return; |
| 490 if (m_private) | 489 if (m_private) |
| 491 m_private->dispose(); | 490 m_private->dispose(); |
| 492 m_private = p; | 491 m_private = p; |
| 493 } | 492 } |
| 494 | 493 |
| 495 } // namespace blink | 494 } // namespace blink |
| OLD | NEW |