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

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

Issue 2860573003: Disables Native App Launcher functionality. (Closed)
Patch Set: fixed egtests compilation Created 3 years, 8 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: ios/chrome/browser/tabs/tab.mm
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
index 74967ab7ea9b90cffc63ffb9ba4e443550c59230..0162ee0c3d605aa6515fc8de53e92890880d5532 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -506,7 +506,8 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
initWithSnapshotManager:snapshotManager_
tab:self]);
- [self initNativeAppNavigationController];
+ if (experimental_flags::IsNativeAppLauncherEnabled())
+ [self initNativeAppNavigationController];
[[NSNotificationCenter defaultCenter]
addObserver:self
@@ -1631,6 +1632,12 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
- (BOOL)urlTriggersNativeAppLaunch:(const GURL&)url
sourceURL:(const GURL&)sourceURL
linkClicked:(BOOL)linkClicked {
+ // TODO(crbug/711511): If Native App Launcher is not enabled, returning NO
+ // bypasses all Link Navigation logic. This call should eventually be
+ // eliminated.
+ if (!experimental_flags::IsNativeAppLauncherEnabled())
+ return NO;
+
// Don't open any native app directly when prerendering or from Incognito.
if (isPrerenderTab_ || self.browserState->IsOffTheRecord())
return NO;
@@ -1919,6 +1926,10 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
}
- (NativeAppNavigationController*)nativeAppNavigationController {
+ // TODO(crbug.com/711511): If Native App Launcher is not enabled, simply
+ // return nil here. This method should eventually be eliminated.
+ if (!experimental_flags::IsNativeAppLauncherEnabled())
+ return nil;
return nativeAppNavigationController_;
}
« no previous file with comments | « ios/chrome/browser/resources/Settings.bundle/Experimental.plist ('k') | ios/chrome/browser/tabs/tab_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698