Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: third_party/WebKit/Source/web/WebDataSourceImpl.cpp

Issue 2359723007: PlzNavigate: update navigation only if it took place. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::updateNavigation(double redirectStartTime, double redire ctEndTime, double fetchStartTime, const WebVector<WebURL>& redirectChain) 78 void WebDataSourceImpl::updateNavigation(double redirectStartTime, double redire ctEndTime, double fetchStartTime, const WebVector<WebURL>& redirectChain)
79 { 79 {
80 for (size_t i = 0; i + 1 < redirectChain.size(); ++i) 80 if (redirectChain.size() >= 2) {
clamy 2016/09/23 15:35:38 This does not seem related to the other issue and
arthursonzogni 2016/09/26 08:30:32 There are related because they cause the same asse
81 didRedirect(redirectChain[i], redirectChain[i + 1]); 81 for (size_t i = 0; i + 1 < redirectChain.size(); ++i)
82 timing().setRedirectStart(redirectStartTime); 82 didRedirect(redirectChain[i], redirectChain[i + 1]);
83 timing().setRedirectEnd(redirectEndTime); 83 timing().setRedirectStart(redirectStartTime);
84 timing().setRedirectEnd(redirectEndTime);
85 }
84 timing().setFetchStart(fetchStartTime); 86 timing().setFetchStart(fetchStartTime);
85 } 87 }
86 88
87 void WebDataSourceImpl::redirectChain(WebVector<WebURL>& result) const 89 void WebDataSourceImpl::redirectChain(WebVector<WebURL>& result) const
88 { 90 {
89 result.assign(m_redirectChain); 91 result.assign(m_redirectChain);
90 } 92 }
91 93
92 bool WebDataSourceImpl::isClientRedirect() const 94 bool WebDataSourceImpl::isClientRedirect() const
93 { 95 {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 { 165 {
164 DocumentLoader::setSubresourceFilter(WTF::wrapUnique(subresourceFilter)); 166 DocumentLoader::setSubresourceFilter(WTF::wrapUnique(subresourceFilter));
165 } 167 }
166 168
167 DEFINE_TRACE(WebDataSourceImpl) 169 DEFINE_TRACE(WebDataSourceImpl)
168 { 170 {
169 DocumentLoader::trace(visitor); 171 DocumentLoader::trace(visitor);
170 } 172 }
171 173
172 } // namespace blink 174 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698