Remove transient entries
Transient navigation entries were only used for non-committed (overlay)
interstitials and a few tests. Since overlay interstitials have been
removed, this CL changes the tests to use regular entries, and removes
the transient entry concept.
Bug: 1077074
Change-Id: Ide09a628fae91a04308ae26efde7112f1e468250
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2149954
Auto-Submit: Carlos IL <[email protected]>
Commit-Queue: Camille Lamy <[email protected]>
Reviewed-by: Camille Lamy <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Charlie Reis <[email protected]>
Cr-Commit-Position: refs/heads/master@{#771811}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 955cf04..0f7b67e 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1389,20 +1389,13 @@
#endif
const base::string16& WebContentsImpl::GetTitle() {
- // Transient entries take precedence. They are used for interstitial pages
- // that are shown on top of existing pages.
- NavigationEntry* entry = controller_.GetTransientEntry();
- if (entry) {
- return entry->GetTitleForDisplay();
- }
-
WebUI* our_web_ui =
GetRenderManager()->speculative_frame_host()
? GetRenderManager()->speculative_frame_host()->web_ui()
: GetRenderManager()->current_frame_host()->web_ui();
if (our_web_ui) {
// Don't override the title in view source mode.
- entry = controller_.GetVisibleEntry();
+ NavigationEntry* entry = controller_.GetVisibleEntry();
if (!(entry && entry->IsViewSourceMode())) {
// Give the Web UI the chance to override our title.
const base::string16& title = our_web_ui->GetOverriddenTitle();
@@ -1415,7 +1408,7 @@
// navigation entry. For example, when the user types in a URL, we want to
// keep the old page's title until the new load has committed and we get a new
// title.
- entry = controller_.GetLastCommittedEntry();
+ NavigationEntry* entry = controller_.GetLastCommittedEntry();
// We make an exception for initial navigations. We only want to use the title
// from the visible entry if: