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

Side by Side Diff: content/browser/frame_host/navigator_impl.cc

Issue 1035953002: PlzNavigate: Properly call WebContents::DidStartNavigatingToPendingEntry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/frame_host/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/browser/frame_host/frame_tree.h" 10 #include "content/browser/frame_host/frame_tree.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 base::TimeTicks navigation_start = base::TimeTicks::Now(); 270 base::TimeTicks navigation_start = base::TimeTicks::Now();
271 271
272 RenderFrameHostManager* manager = frame_tree_node->render_manager(); 272 RenderFrameHostManager* manager = frame_tree_node->render_manager();
273 273
274 // PlzNavigate: the RenderFrameHosts are no longer asked to navigate. 274 // PlzNavigate: the RenderFrameHosts are no longer asked to navigate.
275 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 275 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
276 switches::kEnableBrowserSideNavigation)) { 276 switches::kEnableBrowserSideNavigation)) {
277 navigation_data_.reset(new NavigationMetricsData( 277 navigation_data_.reset(new NavigationMetricsData(
278 navigation_start, entry.GetURL(), entry.restore_type())); 278 navigation_start, entry.GetURL(), entry.restore_type()));
279 RequestNavigation(frame_tree_node, entry, reload_type, navigation_start); 279 RequestNavigation(frame_tree_node, entry, reload_type, navigation_start);
280
281 // Notify observers about navigation.
282 if (delegate_)
283 delegate_->DidStartNavigationToPendingEntry(entry.GetURL(), reload_type);
284
280 return true; 285 return true;
281 } 286 }
282 287
283 RenderFrameHostImpl* dest_render_frame_host = manager->Navigate(entry); 288 RenderFrameHostImpl* dest_render_frame_host = manager->Navigate(entry);
284 if (!dest_render_frame_host) 289 if (!dest_render_frame_host)
285 return false; // Unable to create the desired RenderFrameHost. 290 return false; // Unable to create the desired RenderFrameHost.
286 291
287 // Make sure no code called via RFHM::Navigate clears the pending entry. 292 // Make sure no code called via RFHM::Navigate clears the pending entry.
288 CHECK_EQ(controller_->GetPendingEntry(), &entry); 293 CHECK_EQ(controller_->GetPendingEntry(), &entry);
289 294
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", 879 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted",
875 time_to_commit); 880 time_to_commit);
876 UMA_HISTOGRAM_TIMES( 881 UMA_HISTOGRAM_TIMES(
877 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", 882 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted",
878 time_to_network); 883 time_to_network);
879 } 884 }
880 navigation_data_.reset(); 885 navigation_data_.reset();
881 } 886 }
882 887
883 } // namespace content 888 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698