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

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

Issue 2653953005: PlzNavigate: transmit redirect info to the renderer side (Closed)
Patch Set: Addressed comments Created 3 years, 10 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
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]);
Nate Chapin 2017/02/17 18:25:28 I think didRedirect now just has a single caller,
clamy 2017/02/20 15:42:01 Done.
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebDataSourceImpl.h ('k') | third_party/WebKit/public/web/WebDataSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698