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

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

Issue 2821453003: Removes Native App Launcher functionality. (Closed)
Patch Set: removed unit tests that are no longer relevant 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
« no previous file with comments | « no previous file | ios/chrome/browser/tabs/tab_unittest.mm » ('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 3b94a7e5f17d072ce6a37b4b3b194c18548b963c..f43eb9bcecc753d7a109a353a0f6991c302a2afd 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -277,10 +277,6 @@ bool IsApplicationStateNotActive(UIApplicationState state) {
// Handles autofill.
base::scoped_nsobject<AutofillController> autofillController_;
- // Handles GAL infobar on web pages.
- base::scoped_nsobject<NativeAppNavigationController>
Eugene But (OOO till 7-30) 2017/04/14 14:30:51 Are there any includes which now can be removed (n
pkl (ping after 24h if needed) 2017/04/14 16:59:23 Yes. Done.
- nativeAppNavigationController_;
-
// Handles caching and retrieving of snapshots.
base::scoped_nsobject<SnapshotManager> snapshotManager_;
@@ -345,9 +341,6 @@ bool IsApplicationStateNotActive(UIApplicationState state) {
// Returns the OpenInController for this tab.
- (OpenInController*)openInController;
-// Initialize the Native App Launcher controller.
-- (void)initNativeAppNavigationController;
-
// Handles exportable files if possible.
- (void)handleExportableFile:(net::HttpResponseHeaders*)headers;
@@ -500,8 +493,6 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
initWithSnapshotManager:snapshotManager_
tab:self]);
- [self initNativeAppNavigationController];
-
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(applicationDidBecomeActive)
@@ -1608,29 +1599,8 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
- (BOOL)urlTriggersNativeAppLaunch:(const GURL&)url
sourceURL:(const GURL&)sourceURL
linkClicked:(BOOL)linkClicked {
- // Don't open any native app directly when prerendering or from Incognito.
- if (isPrerenderTab_ || self.browserState->IsOffTheRecord())
- return NO;
-
- base::scoped_nsprotocol<id<NativeAppMetadata>> metadata(
- [[ios::GetChromeBrowserProvider()->GetNativeAppWhitelistManager()
- nativeAppForURL:url] retain]);
- if (![metadata shouldAutoOpenLinks])
- return NO;
-
- AuthenticationService* authenticationService =
- AuthenticationServiceFactory::GetForBrowserState(self.browserState);
- ChromeIdentity* identity = authenticationService->GetAuthenticatedIdentity();
-
- // Attempts to open external app without x-callback.
- if ([self openExternalURL:[metadata launchURLWithURL:url identity:identity]
- sourceURL:sourceURL
- linkClicked:linkClicked]) {
- return YES;
- }
-
- // Auto-open didn't work. Reset the auto-open flag.
- [metadata unsetShouldAutoOpenLinks];
+ // TODO(crbug/711511): Returning NO bypasses all Link Navigation logic
+ // for Native App Launcher. This call should eventually be eliminated.
return NO;
}
@@ -1914,16 +1884,8 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
}
- (NativeAppNavigationController*)nativeAppNavigationController {
- return nativeAppNavigationController_;
-}
-
-- (void)initNativeAppNavigationController {
- if (browserState_->IsOffTheRecord())
- return;
- DCHECK(!nativeAppNavigationController_);
- nativeAppNavigationController_.reset(
- [[NativeAppNavigationController alloc] initWithWebState:self.webState]);
- DCHECK(nativeAppNavigationController_);
+ // TODO(crbug.com/711511): This call should eventually be eliminated.
+ return nil;
}
- (id<PassKitDialogProvider>)passKitDialogProvider {
« no previous file with comments | « no previous file | ios/chrome/browser/tabs/tab_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698