| 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 | 314 |
| 315 return *m_private->m_resourceRequest; | 315 return *m_private->m_resourceRequest; |
| 316 } | 316 } |
| 317 | 317 |
| 318 WebURLRequest::Priority WebURLRequest::priority() const | 318 WebURLRequest::Priority WebURLRequest::priority() const |
| 319 { | 319 { |
| 320 return static_cast<WebURLRequest::Priority>( | 320 return static_cast<WebURLRequest::Priority>( |
| 321 m_private->m_resourceRequest->priority()); | 321 m_private->m_resourceRequest->priority()); |
| 322 } | 322 } |
| 323 | 323 |
| 324 void WebURLRequest::setPriority(WebURLRequest::Priority priority) |
| 325 { |
| 326 m_private->m_resourceRequest->setPriority( |
| 327 static_cast<ResourceLoadPriority>(priority)); |
| 328 } |
| 329 |
| 324 const ResourceRequest& WebURLRequest::toResourceRequest() const | 330 const ResourceRequest& WebURLRequest::toResourceRequest() const |
| 325 { | 331 { |
| 326 ASSERT(m_private); | 332 ASSERT(m_private); |
| 327 ASSERT(m_private->m_resourceRequest); | 333 ASSERT(m_private->m_resourceRequest); |
| 328 | 334 |
| 329 return *m_private->m_resourceRequest; | 335 return *m_private->m_resourceRequest; |
| 330 } | 336 } |
| 331 | 337 |
| 332 void WebURLRequest::assign(WebURLRequestPrivate* p) | 338 void WebURLRequest::assign(WebURLRequestPrivate* p) |
| 333 { | 339 { |
| 334 // Subclasses may call this directly so a self-assignment check is needed | 340 // Subclasses may call this directly so a self-assignment check is needed |
| 335 // here as well as in the public assign method. | 341 // here as well as in the public assign method. |
| 336 if (m_private == p) | 342 if (m_private == p) |
| 337 return; | 343 return; |
| 338 if (m_private) | 344 if (m_private) |
| 339 m_private->dispose(); | 345 m_private->dispose(); |
| 340 m_private = p; | 346 m_private = p; |
| 341 } | 347 } |
| 342 | 348 |
| 343 } // namespace blink | 349 } // namespace blink |
| OLD | NEW |