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

Unified Diff: components/web_view/navigation_controller.cc

Issue 1391963004: Correctly record and pass around navigation start time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/web_view/navigation_controller.h ('k') | components/web_view/navigation_entry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/web_view/navigation_controller.cc
diff --git a/components/web_view/navigation_controller.cc b/components/web_view/navigation_controller.cc
index ef6010b4fbd76be8d288ca338bdbe2882cf1ae60..87304fae2866a0f8c1158e79d71ca337d8b3552a 100644
--- a/components/web_view/navigation_controller.cc
+++ b/components/web_view/navigation_controller.cc
@@ -75,7 +75,7 @@ void NavigationController::GoBack() {
pending_entry_index_ = current_index - 1;
// TODO(erg): Transition type handled here.
- NavigateToPendingEntry(ReloadType::NO_RELOAD);
+ NavigateToPendingEntry(ReloadType::NO_RELOAD, true);
}
void NavigationController::GoForward() {
@@ -93,17 +93,19 @@ void NavigationController::GoForward() {
pending_entry_index_ = current_index + 1;
// TODO(erg): Transition type handled here.
- NavigateToPendingEntry(ReloadType::NO_RELOAD);
+ NavigateToPendingEntry(ReloadType::NO_RELOAD, true);
}
void NavigationController::LoadURL(mojo::URLRequestPtr request) {
// TODO(erg): This mimics part of NavigationControllerImpl::LoadURL(), minus
// all the error checking.
SetPendingEntry(make_scoped_ptr(new NavigationEntry(request.Pass())));
- NavigateToPendingEntry(ReloadType::NO_RELOAD);
+ NavigateToPendingEntry(ReloadType::NO_RELOAD, false);
}
-void NavigationController::NavigateToPendingEntry(ReloadType reload_type) {
+void NavigationController::NavigateToPendingEntry(
+ ReloadType reload_type,
+ bool update_navigation_start_time) {
// TODO(erg): Deal with session history navigations while trying to navigate
// to a slow-to-commit page.
@@ -117,7 +119,8 @@ void NavigationController::NavigateToPendingEntry(ReloadType reload_type) {
// TODO(erg): Eventually, we need to deal with restoring the state of the
// full tree. For now, we'll just shell back to the WebView.
- delegate_->OnNavigate(pending_entry_->BuildURLRequest());
+ delegate_->OnNavigate(
+ pending_entry_->BuildURLRequest(update_navigation_start_time));
}
void NavigationController::DiscardPendingEntry(bool was_failure) {
« no previous file with comments | « components/web_view/navigation_controller.h ('k') | components/web_view/navigation_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698