| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. |
| 3 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 const KURL& ResourceRequest::url() const | 155 const KURL& ResourceRequest::url() const |
| 156 { | 156 { |
| 157 return m_url; | 157 return m_url; |
| 158 } | 158 } |
| 159 | 159 |
| 160 void ResourceRequest::setURL(const KURL& url) | 160 void ResourceRequest::setURL(const KURL& url) |
| 161 { | 161 { |
| 162 m_url = url; | 162 m_url = url; |
| 163 } | 163 } |
| 164 | 164 |
| 165 const KURL& ResourceRequest::initialUrl() const |
| 166 { |
| 167 return m_initialUrl.isNull() ? m_url : m_initialUrl; |
| 168 } |
| 169 |
| 165 void ResourceRequest::removeCredentials() | 170 void ResourceRequest::removeCredentials() |
| 166 { | 171 { |
| 167 if (m_url.user().isEmpty() && m_url.pass().isEmpty()) | 172 if (m_url.user().isEmpty() && m_url.pass().isEmpty()) |
| 168 return; | 173 return; |
| 169 | 174 |
| 170 m_url.setUser(String()); | 175 m_url.setUser(String()); |
| 171 m_url.setPass(String()); | 176 m_url.setPass(String()); |
| 172 } | 177 } |
| 173 | 178 |
| 174 WebCachePolicy ResourceRequest::getCachePolicy() const | 179 WebCachePolicy ResourceRequest::getCachePolicy() const |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 378 |
| 374 WebAddressSpace targetSpace = WebAddressSpacePublic; | 379 WebAddressSpace targetSpace = WebAddressSpacePublic; |
| 375 if (NetworkUtils::isReservedIPAddress(m_url.host())) | 380 if (NetworkUtils::isReservedIPAddress(m_url.host())) |
| 376 targetSpace = WebAddressSpacePrivate; | 381 targetSpace = WebAddressSpacePrivate; |
| 377 if (SecurityOrigin::create(m_url)->isLocalhost()) | 382 if (SecurityOrigin::create(m_url)->isLocalhost()) |
| 378 targetSpace = WebAddressSpaceLocal; | 383 targetSpace = WebAddressSpaceLocal; |
| 379 | 384 |
| 380 m_isExternalRequest = requestorSpace > targetSpace; | 385 m_isExternalRequest = requestorSpace > targetSpace; |
| 381 } | 386 } |
| 382 | 387 |
| 388 void ResourceRequest::setInitialURL(const KURL& url) |
| 389 { |
| 390 m_initialUrl = url; |
| 391 } |
| 392 |
| 393 void ResourceRequest::setNavigationStartTime(double navigationStart) |
| 394 { |
| 395 m_navigationStart = navigationStart; |
| 396 } |
| 397 |
| 383 bool ResourceRequest::isConditional() const | 398 bool ResourceRequest::isConditional() const |
| 384 { | 399 { |
| 385 return (m_httpHeaderFields.contains(HTTPNames::If_Match) | 400 return (m_httpHeaderFields.contains(HTTPNames::If_Match) |
| 386 || m_httpHeaderFields.contains(HTTPNames::If_Modified_Since) | 401 || m_httpHeaderFields.contains(HTTPNames::If_Modified_Since) |
| 387 || m_httpHeaderFields.contains(HTTPNames::If_None_Match) | 402 || m_httpHeaderFields.contains(HTTPNames::If_None_Match) |
| 388 || m_httpHeaderFields.contains(HTTPNames::If_Range) | 403 || m_httpHeaderFields.contains(HTTPNames::If_Range) |
| 389 || m_httpHeaderFields.contains(HTTPNames::If_Unmodified_Since)); | 404 || m_httpHeaderFields.contains(HTTPNames::If_Unmodified_Since)); |
| 390 } | 405 } |
| 391 | 406 |
| 392 void ResourceRequest::setHasUserGesture(bool hasUserGesture) | 407 void ResourceRequest::setHasUserGesture(bool hasUserGesture) |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 m_didSetHTTPReferrer = false; | 460 m_didSetHTTPReferrer = false; |
| 446 m_checkForBrowserSideNavigation = true; | 461 m_checkForBrowserSideNavigation = true; |
| 447 m_uiStartTime = 0; | 462 m_uiStartTime = 0; |
| 448 m_isExternalRequest = false; | 463 m_isExternalRequest = false; |
| 449 m_inputPerfMetricReportPolicy = InputToLoadPerfMetricReportPolicy::NoReport; | 464 m_inputPerfMetricReportPolicy = InputToLoadPerfMetricReportPolicy::NoReport; |
| 450 m_redirectStatus = RedirectStatus::NoRedirect; | 465 m_redirectStatus = RedirectStatus::NoRedirect; |
| 451 m_requestorOrigin = SecurityOrigin::createUnique(); | 466 m_requestorOrigin = SecurityOrigin::createUnique(); |
| 452 } | 467 } |
| 453 | 468 |
| 454 } // namespace blink | 469 } // namespace blink |
| OLD | NEW |