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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2196333002: PlzNavigate: Clear provisional history item on redirects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@timing_api
Patch Set: Addressed comments (2) Created 4 years, 4 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 3177 matching lines...) Expand 10 before | Expand all | Expand 10 after
3188 double redirect_start = ConvertToBlinkTime( 3188 double redirect_start = ConvertToBlinkTime(
3189 navigation_state->request_params().navigation_timing.redirect_start); 3189 navigation_state->request_params().navigation_timing.redirect_start);
3190 double redirect_end = ConvertToBlinkTime( 3190 double redirect_end = ConvertToBlinkTime(
3191 navigation_state->request_params().navigation_timing.redirect_end); 3191 navigation_state->request_params().navigation_timing.redirect_end);
3192 double fetch_start = ConvertToBlinkTime( 3192 double fetch_start = ConvertToBlinkTime(
3193 navigation_state->request_params().navigation_timing.fetch_start); 3193 navigation_state->request_params().navigation_timing.fetch_start);
3194 std::vector<GURL> redirectChain = 3194 std::vector<GURL> redirectChain =
3195 navigation_state->request_params().redirects; 3195 navigation_state->request_params().redirects;
3196 redirectChain.push_back(navigation_state->common_params().url); 3196 redirectChain.push_back(navigation_state->common_params().url);
3197 3197
3198 datasource->updateNavigationTimings(redirect_start, redirect_end, 3198 datasource->updateNavigation(redirect_start, redirect_end, fetch_start,
3199 fetch_start, redirectChain); 3199 redirectChain);
3200
3201 // TODO(clamy) We need to provide additional timing values for the 3200 // TODO(clamy) We need to provide additional timing values for the
3202 // Navigation Timing API to work with browser-side navigations. 3201 // Navigation Timing API to work with browser-side navigations.
3203 // UnloadEventStart and UnloadEventEnd are still missing. 3202 // UnloadEventStart and UnloadEventEnd are still missing.
3204 } 3203 }
3205 3204
3206 // Create the serviceworker's per-document network observing object if it 3205 // Create the serviceworker's per-document network observing object if it
3207 // does not exist (When navigation happens within a page, the provider already 3206 // does not exist (When navigation happens within a page, the provider already
3208 // exists). 3207 // exists).
3209 if (ServiceWorkerNetworkProvider::FromDocumentState( 3208 if (ServiceWorkerNetworkProvider::FromDocumentState(
3210 DocumentState::FromDataSource(datasource))) 3209 DocumentState::FromDataSource(datasource)))
(...skipping 3157 matching lines...) Expand 10 before | Expand all | Expand 10 after
6368 // event target. Potentially a Pepper plugin will receive the event. 6367 // event target. Potentially a Pepper plugin will receive the event.
6369 // In order to tell whether a plugin gets the last mouse event and which it 6368 // In order to tell whether a plugin gets the last mouse event and which it
6370 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6369 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6371 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6370 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6372 // |pepper_last_mouse_event_target_|. 6371 // |pepper_last_mouse_event_target_|.
6373 pepper_last_mouse_event_target_ = nullptr; 6372 pepper_last_mouse_event_target_ = nullptr;
6374 #endif 6373 #endif
6375 } 6374 }
6376 6375
6377 } // namespace content 6376 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698