| Index: ios/chrome/browser/tabs/tab.mm
|
| diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
|
| index 9c5817c93f2cc87c952e47199a85086a156df635..7dd1d6e65ed22f3cb52906c3083549605fd230e9 100644
|
| --- a/ios/chrome/browser/tabs/tab.mm
|
| +++ b/ios/chrome/browser/tabs/tab.mm
|
| @@ -337,10 +337,6 @@ enum class RendererTerminationTabState {
|
| // Sets the favicon on the current NavigationItem.
|
| - (void)setFavicon:(const gfx::Image*)image;
|
|
|
| -// Updates the title field of the current session entry. Also updates the
|
| -// history database.
|
| -- (void)updateTitle:(NSString*)title;
|
| -
|
| // Saves the current title to the history database.
|
| - (void)saveTitleToHistoryDB;
|
|
|
| @@ -993,20 +989,6 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
|
| overscrollActionsControllerDelegate);
|
| }
|
|
|
| -- (void)updateTitle:(NSString*)title {
|
| - web::NavigationItem* item = [self navigationManager]->GetVisibleItem();
|
| - if (!item)
|
| - return;
|
| - item->SetTitle(base::SysNSStringToUTF16(title));
|
| - // TODO(crbug.com/546218): See if this can be removed; it's not clear that
|
| - // other platforms send this (tab sync triggers need to be compared against
|
| - // upstream).
|
| - if (webStateImpl_)
|
| - webStateImpl_->GetNavigationManagerImpl().OnNavigationItemChanged();
|
| -
|
| - [self saveTitleToHistoryDB];
|
| -}
|
| -
|
| - (void)saveTitleToHistoryDB {
|
| // If incognito, don't update history.
|
| if (browserState_->IsOffTheRecord())
|
| @@ -1831,13 +1813,8 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
|
|
|
| - (void)webController:(CRWWebController*)webController
|
| titleDidChange:(NSString*)title {
|
| - NSString* oldTitle = [self title];
|
| - BOOL isTitleChanged = (!oldTitle && title) || (oldTitle && !title) ||
|
| - (![oldTitle isEqualToString:title]);
|
| - if (isTitleChanged) {
|
| - [self updateTitle:title];
|
| - [parentTabModel_ notifyTabChanged:self];
|
| - }
|
| + [self saveTitleToHistoryDB];
|
| + [parentTabModel_ notifyTabChanged:self];
|
| }
|
|
|
| - (BOOL)urlTriggersNativeAppLaunch:(const GURL&)url
|
|
|