commit | 0de0f451bf44ce6eefbe3bcfa007d6ab6c6daec5 | [log] [tgz] |
---|---|---|
author | Lukasz Anforowicz <[email protected]> | Wed Dec 02 19:57:15 2020 |
committer | Chromium LUCI CQ <[email protected]> | Wed Dec 02 19:57:15 2020 |
tree | 311ebcf84bc7065f812ef8502c9c4c8b3387ac88 | |
parent | 242b0e7efd7df596b842227753f1d73f67c0efb0 [diff] [blame] |
Merging LAST_SESSION and CURRENT_SESSION content::RestoreType values. This CL merges content::RestoreType::LAST_SESSION and content::RestoreType::CURRENT_SESSION enum values into a single enum value (kRestored). The CL also renames NONE into kNotRestored. The merge is possible and desirable because after https://crrev.com/c/2551736 the code does not distinguish between LAST_SESSION and CURRENT_SESSION when inspecting/reading RestoreType values (other than in a few test assertions + in a DCHECK in SessionRestorePageLoadMetricsObserver::OnStart). Fixed: 1150940 Change-Id: I6dc2eaf62d7eda99520108a473b3cf466878bb24 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2551302 Commit-Queue: Łukasz Anforowicz <[email protected]> Auto-Submit: Łukasz Anforowicz <[email protected]> Reviewed-by: Scott Violet <[email protected]> Reviewed-by: Nasko Oskov <[email protected]> Cr-Commit-Position: refs/heads/master@{#832924}
diff --git a/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc index bc4c90a..30eb7b40 100644 --- a/content/browser/renderer_host/navigation_controller_impl.cc +++ b/content/browser/renderer_host/navigation_controller_impl.cc
@@ -1095,7 +1095,7 @@ DCHECK(pending_entry_index_ == -1 || pending_entry_->site_instance() || pending_entry_->IsRestored()); if (pending_entry_ && pending_entry_->IsRestored()) { - pending_entry_->set_restore_type(RestoreType::NONE); + pending_entry_->set_restore_type(RestoreType::kNotRestored); was_restored = true; } @@ -2089,8 +2089,7 @@ session_storage_namespace_map_[it->first] = source_namespace->Clone(); } - FinishRestore(source->last_committed_entry_index_, - RestoreType::CURRENT_SESSION); + FinishRestore(source->last_committed_entry_index_, RestoreType::kRestored); } void NavigationControllerImpl::CopyStateFromAndPrune(NavigationController* temp,