| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 public: | 68 public: |
| 69 WebURLRequestPrivateImpl() | 69 WebURLRequestPrivateImpl() |
| 70 { | 70 { |
| 71 m_resourceRequest = &m_resourceRequestAllocation; | 71 m_resourceRequest = &m_resourceRequestAllocation; |
| 72 } | 72 } |
| 73 | 73 |
| 74 WebURLRequestPrivateImpl(const WebURLRequestPrivate* p) | 74 WebURLRequestPrivateImpl(const WebURLRequestPrivate* p) |
| 75 : m_resourceRequestAllocation(*p->m_resourceRequest) | 75 : m_resourceRequestAllocation(*p->m_resourceRequest) |
| 76 { | 76 { |
| 77 m_resourceRequest = &m_resourceRequestAllocation; | 77 m_resourceRequest = &m_resourceRequestAllocation; |
| 78 m_allowStoredCredentials = p->m_allowStoredCredentials; | |
| 79 } | 78 } |
| 80 | 79 |
| 81 virtual void dispose() { delete this; } | 80 virtual void dispose() { delete this; } |
| 82 | 81 |
| 83 private: | 82 private: |
| 84 virtual ~WebURLRequestPrivateImpl() { } | 83 virtual ~WebURLRequestPrivateImpl() { } |
| 85 | 84 |
| 86 ResourceRequest m_resourceRequestAllocation; | 85 ResourceRequest m_resourceRequestAllocation; |
| 87 }; | 86 }; |
| 88 | 87 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 WebURL WebURLRequest::firstPartyForCookies() const | 119 WebURL WebURLRequest::firstPartyForCookies() const |
| 121 { | 120 { |
| 122 return m_private->m_resourceRequest->firstPartyForCookies(); | 121 return m_private->m_resourceRequest->firstPartyForCookies(); |
| 123 } | 122 } |
| 124 | 123 |
| 125 void WebURLRequest::setFirstPartyForCookies(const WebURL& firstPartyForCookies) | 124 void WebURLRequest::setFirstPartyForCookies(const WebURL& firstPartyForCookies) |
| 126 { | 125 { |
| 127 m_private->m_resourceRequest->setFirstPartyForCookies(firstPartyForCookies); | 126 m_private->m_resourceRequest->setFirstPartyForCookies(firstPartyForCookies); |
| 128 } | 127 } |
| 129 | 128 |
| 130 bool WebURLRequest::allowCookies() const | |
| 131 { | |
| 132 return m_private->m_resourceRequest->allowCookies(); | |
| 133 } | |
| 134 | |
| 135 void WebURLRequest::setAllowCookies(bool allowCookies) | |
| 136 { | |
| 137 m_private->m_resourceRequest->setAllowCookies(allowCookies); | |
| 138 } | |
| 139 | |
| 140 bool WebURLRequest::allowStoredCredentials() const | 129 bool WebURLRequest::allowStoredCredentials() const |
| 141 { | 130 { |
| 142 return m_private->m_allowStoredCredentials; | 131 return m_private->m_resourceRequest->allowStoredCredentials(); |
| 143 } | 132 } |
| 144 | 133 |
| 145 void WebURLRequest::setAllowStoredCredentials(bool allowStoredCredentials) | 134 void WebURLRequest::setAllowStoredCredentials(bool allowStoredCredentials) |
| 146 { | 135 { |
| 147 m_private->m_allowStoredCredentials = allowStoredCredentials; | 136 m_private->m_resourceRequest->setAllowStoredCredentials(allowStoredCredentia
ls); |
| 148 } | 137 } |
| 149 | 138 |
| 150 WebURLRequest::CachePolicy WebURLRequest::cachePolicy() const | 139 WebURLRequest::CachePolicy WebURLRequest::cachePolicy() const |
| 151 { | 140 { |
| 152 return static_cast<WebURLRequest::CachePolicy>( | 141 return static_cast<WebURLRequest::CachePolicy>( |
| 153 m_private->m_resourceRequest->cachePolicy()); | 142 m_private->m_resourceRequest->cachePolicy()); |
| 154 } | 143 } |
| 155 | 144 |
| 156 void WebURLRequest::setCachePolicy(CachePolicy cachePolicy) | 145 void WebURLRequest::setCachePolicy(CachePolicy cachePolicy) |
| 157 { | 146 { |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 // Subclasses may call this directly so a self-assignment check is needed | 344 // Subclasses may call this directly so a self-assignment check is needed |
| 356 // here as well as in the public assign method. | 345 // here as well as in the public assign method. |
| 357 if (m_private == p) | 346 if (m_private == p) |
| 358 return; | 347 return; |
| 359 if (m_private) | 348 if (m_private) |
| 360 m_private->dispose(); | 349 m_private->dispose(); |
| 361 m_private = p; | 350 m_private = p; |
| 362 } | 351 } |
| 363 | 352 |
| 364 } // namespace blink | 353 } // namespace blink |
| OLD | NEW |