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

Unified Diff: ios/chrome/browser/tabs/tab.mm

Issue 2711343002: Remove unused notification kTabModelUserNavigatedNavigation. (Closed)
Patch Set: Rebase. Created 3 years, 10 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 | « no previous file | ios/chrome/browser/tabs/tab_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/tabs/tab.mm
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
index 4dd34f0a266a6ee14bc5ee0abcb1fc795eb9d803..10e41e5cf9521713eab0772ee0364bb7293306bb 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -228,9 +228,6 @@ enum class RendererTerminationTabState {
// Whether or not this tab is currently being displayed.
BOOL visible_;
- // Used between -webWillStartLoadingURL: and -webDidStartLoadingURL:.
- BOOL isUserNavigationEvent_;
-
// Holds entries that need to be added to the history DB. Prerender tabs do
// not write navigation data to the history DB. Instead, they cache history
// data in this vector and add it to the DB when the prerender status is
@@ -1674,7 +1671,7 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
// Move the toolbar to visible during page load.
[fullScreenController_ disableFullScreen];
- isUserNavigationEvent_ =
+ BOOL isUserNavigationEvent =
(transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK) == 0;
// Check for link-follow clobbers. These are changes where there is no
// pending entry (since that means the change wasn't caused by this class),
@@ -1682,7 +1679,7 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
// TODO(crbug.com/546401): Consider moving this into NavigationManager, or
// into a NavigationManager observer callback, so it doesn't need to be
// checked in several places.
- if (isUserNavigationEvent_ && !isPrerenderTab_ &&
+ if (isUserNavigationEvent && !isPrerenderTab_ &&
![self navigationManager]->GetPendingItem() && url != self.url) {
base::RecordAction(UserMetricsAction("MobileTabClobbered"));
if ([parentTabModel_ tabUsageRecorder])
@@ -1720,11 +1717,6 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
GURL lastCommittedURL = webState->GetLastCommittedURL();
[autoReloadBridge_ loadStartedForURL:lastCommittedURL];
- if (isUserNavigationEvent_) {
- [[NSNotificationCenter defaultCenter]
- postNotificationName:kTabModelUserNavigatedNotification
- object:self];
- }
if (parentTabModel_) {
[[NSNotificationCenter defaultCenter]
postNotificationName:kTabModelTabWillStartLoadingNotification
« no previous file with comments | « no previous file | ios/chrome/browser/tabs/tab_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698