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

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: 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 3171 matching lines...) Expand 10 before | Expand all | Expand 10 after
3182 base::TimeTicks redirect_start = 3182 base::TimeTicks redirect_start =
3183 navigation_state->request_params().navigation_timing.redirect_start; 3183 navigation_state->request_params().navigation_timing.redirect_start;
3184 base::TimeTicks redirect_end = 3184 base::TimeTicks redirect_end =
3185 navigation_state->request_params().navigation_timing.redirect_end; 3185 navigation_state->request_params().navigation_timing.redirect_end;
3186 base::TimeTicks fetch_start = 3186 base::TimeTicks fetch_start =
3187 navigation_state->request_params().navigation_timing.fetch_start; 3187 navigation_state->request_params().navigation_timing.fetch_start;
3188 std::vector<GURL> redirectChain = 3188 std::vector<GURL> redirectChain =
3189 navigation_state->request_params().redirects; 3189 navigation_state->request_params().redirects;
3190 redirectChain.push_back(navigation_state->common_params().url); 3190 redirectChain.push_back(navigation_state->common_params().url);
3191 3191
3192 datasource->updateNavigationTimings( 3192 datasource->updateNavigation(
3193 (redirect_start - base::TimeTicks()).InSecondsF(), 3193 (redirect_start - base::TimeTicks()).InSecondsF(),
3194 (redirect_end - base::TimeTicks()).InSecondsF(), 3194 (redirect_end - base::TimeTicks()).InSecondsF(),
3195 (fetch_start - base::TimeTicks()).InSecondsF(), redirectChain); 3195 (fetch_start - base::TimeTicks()).InSecondsF(), redirectChain);
3196 3196
3197 // TODO(clamy) We need to provide additional timing values for the 3197 // TODO(clamy) We need to provide additional timing values for the
3198 // Navigation Timing API to work with browser-side navigations. 3198 // Navigation Timing API to work with browser-side navigations.
3199 // UnloadEventStart and UnloadEventEnd are still missing. 3199 // UnloadEventStart and UnloadEventEnd are still missing.
3200 } 3200 }
3201 3201
3202 // Create the serviceworker's per-document network observing object if it 3202 // Create the serviceworker's per-document network observing object if it
(...skipping 3158 matching lines...) Expand 10 before | Expand all | Expand 10 after
6361 // event target. Potentially a Pepper plugin will receive the event. 6361 // event target. Potentially a Pepper plugin will receive the event.
6362 // In order to tell whether a plugin gets the last mouse event and which it 6362 // In order to tell whether a plugin gets the last mouse event and which it
6363 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6363 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6364 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6364 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6365 // |pepper_last_mouse_event_target_|. 6365 // |pepper_last_mouse_event_target_|.
6366 pepper_last_mouse_event_target_ = nullptr; 6366 pepper_last_mouse_event_target_ = nullptr;
6367 #endif 6367 #endif
6368 } 6368 }
6369 6369
6370 } // namespace content 6370 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698