| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 } | 67 } |
| 68 | 68 |
| 69 WebURL WebDataSourceImpl::unreachableURL() const { | 69 WebURL WebDataSourceImpl::unreachableURL() const { |
| 70 return DocumentLoader::unreachableURL(); | 70 return DocumentLoader::unreachableURL(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void WebDataSourceImpl::appendRedirect(const WebURL& url) { | 73 void WebDataSourceImpl::appendRedirect(const WebURL& url) { |
| 74 DocumentLoader::appendRedirect(url); | 74 DocumentLoader::appendRedirect(url); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void WebDataSourceImpl::updateNavigation( | 77 void WebDataSourceImpl::updateNavigation(double redirectStartTime, |
| 78 double redirectStartTime, | 78 double redirectEndTime, |
| 79 double redirectEndTime, | 79 double fetchStartTime, |
| 80 double fetchStartTime, | 80 bool hasRedirect) { |
| 81 const WebVector<WebURL>& redirectChain) { | |
| 82 // Updates the redirection timing if there is at least one redirection | 81 // Updates the redirection timing if there is at least one redirection |
| 83 // (between two URLs). | 82 // (between two URLs). |
| 84 if (redirectChain.size() >= 2) { | 83 if (hasRedirect) { |
| 85 for (size_t i = 0; i + 1 < redirectChain.size(); ++i) | |
| 86 didRedirect(redirectChain[i], redirectChain[i + 1]); | |
| 87 timing().setRedirectStart(redirectStartTime); | 84 timing().setRedirectStart(redirectStartTime); |
| 88 timing().setRedirectEnd(redirectEndTime); | 85 timing().setRedirectEnd(redirectEndTime); |
| 89 } | 86 } |
| 90 timing().setFetchStart(fetchStartTime); | 87 timing().setFetchStart(fetchStartTime); |
| 91 } | 88 } |
| 92 | 89 |
| 93 void WebDataSourceImpl::redirectChain(WebVector<WebURL>& result) const { | 90 void WebDataSourceImpl::redirectChain(WebVector<WebURL>& result) const { |
| 94 result.assign(m_redirectChain); | 91 result.assign(m_redirectChain); |
| 95 } | 92 } |
| 96 | 93 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 void WebDataSourceImpl::setSubresourceFilter( | 157 void WebDataSourceImpl::setSubresourceFilter( |
| 161 WebDocumentSubresourceFilter* subresourceFilter) { | 158 WebDocumentSubresourceFilter* subresourceFilter) { |
| 162 DocumentLoader::setSubresourceFilter(WTF::wrapUnique(subresourceFilter)); | 159 DocumentLoader::setSubresourceFilter(WTF::wrapUnique(subresourceFilter)); |
| 163 } | 160 } |
| 164 | 161 |
| 165 DEFINE_TRACE(WebDataSourceImpl) { | 162 DEFINE_TRACE(WebDataSourceImpl) { |
| 166 DocumentLoader::trace(visitor); | 163 DocumentLoader::trace(visitor); |
| 167 } | 164 } |
| 168 | 165 |
| 169 } // namespace blink | 166 } // namespace blink |
| OLD | NEW |