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

Unified Diff: content/browser/frame_host/interstitial_page_impl.cc

Issue 2086423005: Using WebContents::UpdateTitleForEntry() instead of NavigationEntry::SetTitle() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improving comment and removing the NOTREACHED. Created 4 years, 5 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
Index: content/browser/frame_host/interstitial_page_impl.cc
diff --git a/content/browser/frame_host/interstitial_page_impl.cc b/content/browser/frame_host/interstitial_page_impl.cc
index 47e0c48370945e3bd307280b8d4b3e92bb304824..be086821af5c7ae3667842b51eac40f17276adcb 100644
--- a/content/browser/frame_host/interstitial_page_impl.cc
+++ b/content/browser/frame_host/interstitial_page_impl.cc
@@ -298,11 +298,8 @@ void InterstitialPageImpl::Hide() {
controller_->delegate()->DetachInterstitialPage();
// Let's revert to the original title if necessary.
NavigationEntry* entry = controller_->GetVisibleEntry();
- if (entry && !new_navigation_ && should_revert_web_contents_title_) {
- entry->SetTitle(original_web_contents_title_);
- controller_->delegate()->NotifyNavigationStateChanged(
- INVALIDATE_TYPE_TITLE);
- }
+ if (entry && !new_navigation_ && should_revert_web_contents_title_)
+ web_contents_->UpdateTitleForEntry(entry, original_web_contents_title_);
static_cast<WebContentsImpl*>(web_contents_)->DidChangeVisibleSSLState();
@@ -411,8 +408,7 @@ void InterstitialPageImpl::UpdateTitle(
}
// TODO(evan): make use of title_direction.
// http://code.google.com/p/chromium/issues/detail?id=27094
- entry->SetTitle(title);
- controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_TITLE);
+ web_contents_->UpdateTitleForEntry(entry, title);
}
InterstitialPage* InterstitialPageImpl::GetAsInterstitialPage() {
@@ -669,7 +665,7 @@ void InterstitialPageImpl::DontProceed() {
if (should_discard_pending_nav_entry_) {
// Since no navigation happens we have to discard the transient entry
- // explicitely. Note that by calling DiscardNonCommittedEntries() we also
+ // explicitly. Note that by calling DiscardNonCommittedEntries() we also
// discard the pending entry, which is what we want, since the navigation is
// cancelled.
controller_->DiscardNonCommittedEntries();

Powered by Google App Engine
This is Rietveld 408576698