Chromium Code Reviews| 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 WebURL WebDataSourceImpl::unreachableURL() const | 68 WebURL WebDataSourceImpl::unreachableURL() const |
| 69 { | 69 { |
| 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 { | 74 { |
| 75 DocumentLoader::appendRedirect(url); | 75 DocumentLoader::appendRedirect(url); |
| 76 } | 76 } |
| 77 | 77 |
| 78 void WebDataSourceImpl::updateNavigationTimings(double redirectStartTime, double redirectEndTime, double fetchStartTime, const WebVector<WebURL>& redirectChain) | 78 void WebDataSourceImpl::updateNavigation(double redirectStartTime, double redire ctEndTime, double fetchStartTime, const WebVector<WebURL>& redirectChain) |
|
Charlie Reis
2016/08/09 05:07:31
It's not clear to me whether this is the right pla
arthursonzogni
2016/08/10 10:02:24
See another reply above.
| |
| 79 { | 79 { |
| 80 for (size_t i = 0; i + 1 < redirectChain.size(); ++i) | 80 for (size_t i = 0; i + 1 < redirectChain.size(); ++i) |
| 81 timing().addRedirect(redirectChain[i], redirectChain[i + 1]); | 81 timing().addRedirect(redirectChain[i], redirectChain[i + 1]); |
| 82 timing().setRedirectStart(redirectStartTime); | 82 timing().setRedirectStart(redirectStartTime); |
| 83 timing().setRedirectEnd(redirectEndTime); | 83 timing().setRedirectEnd(redirectEndTime); |
| 84 timing().setFetchStart(fetchStartTime); | 84 timing().setFetchStart(fetchStartTime); |
| 85 | |
| 86 // If a redirection happens during a back/forward navigation, don't reuse | |
| 87 // any state from the previous HistoryItem | |
|
Charlie Reis
2016/08/09 05:07:31
nit: End comment sentences with a period.
arthursonzogni
2016/08/10 10:02:24
Done.
| |
| 88 if (redirectChain.size() >= 2) | |
|
nasko
2016/08/03 16:31:25
How do we know this is a back/forward navigation h
arthursonzogni
2016/08/04 14:04:53
Yes it is. But from what I understood, m_provision
Charlie Reis
2016/08/09 05:07:31
Right. That seems consistent with how FrameLoader
| |
| 89 discardProvisionalHistoryItem(); | |
| 85 } | 90 } |
| 86 | 91 |
| 87 void WebDataSourceImpl::redirectChain(WebVector<WebURL>& result) const | 92 void WebDataSourceImpl::redirectChain(WebVector<WebURL>& result) const |
| 88 { | 93 { |
| 89 result.assign(m_redirectChain); | 94 result.assign(m_redirectChain); |
| 90 } | 95 } |
| 91 | 96 |
| 92 bool WebDataSourceImpl::isClientRedirect() const | 97 bool WebDataSourceImpl::isClientRedirect() const |
| 93 { | 98 { |
| 94 return DocumentLoader::isClientRedirect(); | 99 return DocumentLoader::isClientRedirect(); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 163 { | 168 { |
| 164 DocumentLoader::setSubresourceFilter(WTF::wrapUnique(subresourceFilter)); | 169 DocumentLoader::setSubresourceFilter(WTF::wrapUnique(subresourceFilter)); |
| 165 } | 170 } |
| 166 | 171 |
| 167 DEFINE_TRACE(WebDataSourceImpl) | 172 DEFINE_TRACE(WebDataSourceImpl) |
| 168 { | 173 { |
| 169 DocumentLoader::trace(visitor); | 174 DocumentLoader::trace(visitor); |
| 170 } | 175 } |
| 171 | 176 |
| 172 } // namespace blink | 177 } // namespace blink |
| OLD | NEW |