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

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

Issue 2894883004: Removed IsNativeAppLauncherEnabled() experiment (Closed)
Patch Set: rebase Created 3 years, 6 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 | « ios/chrome/browser/tabs/tab.h ('k') | 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 07b97175744ad02940545a2d7d9d824bc1faef48..b34088d95e12385f12ca37cb34a529e833a01d8a 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -60,7 +60,6 @@
#include "ios/chrome/browser/history/top_sites_factory.h"
#include "ios/chrome/browser/infobars/infobar_manager_impl.h"
#import "ios/chrome/browser/metrics/tab_usage_recorder.h"
-#import "ios/chrome/browser/native_app_launcher/native_app_navigation_controller.h"
#import "ios/chrome/browser/passwords/password_controller.h"
#import "ios/chrome/browser/passwords/passwords_ui_delegate_impl.h"
#include "ios/chrome/browser/pref_names.h"
@@ -69,8 +68,6 @@
#include "ios/chrome/browser/sessions/ios_chrome_session_tab_helper.h"
#include "ios/chrome/browser/signin/account_consistency_service_factory.h"
#include "ios/chrome/browser/signin/account_reconcilor_factory.h"
-#include "ios/chrome/browser/signin/authentication_service.h"
-#include "ios/chrome/browser/signin/authentication_service_factory.h"
#include "ios/chrome/browser/signin/signin_capability.h"
#import "ios/chrome/browser/snapshots/snapshot_manager.h"
#import "ios/chrome/browser/snapshots/snapshot_overlay_provider.h"
@@ -105,9 +102,6 @@
#include "ios/chrome/browser/web/print_observer.h"
#import "ios/chrome/browser/xcallback_parameters.h"
#include "ios/chrome/grit/ios_strings.h"
-#include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
-#import "ios/public/provider/chrome/browser/native_app_launcher/native_app_metadata.h"
-#import "ios/public/provider/chrome/browser/native_app_launcher/native_app_whitelist_manager.h"
#import "ios/web/navigation/navigation_item_impl.h"
#import "ios/web/navigation/navigation_manager_impl.h"
#include "ios/web/public/favicon_status.h"
@@ -264,9 +258,6 @@ class TabHistoryContext : public history::Context {
// Handles autofill.
AutofillController* _autofillController;
- // Handles GAL infobar on web pages.
- NativeAppNavigationController* _nativeAppNavigationController;
-
// Handles caching and retrieving of snapshots.
SnapshotManager* _snapshotManager;
@@ -327,9 +318,6 @@ class TabHistoryContext : public history::Context {
// 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;
@@ -477,9 +465,6 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
initWithSnapshotManager:_snapshotManager
tab:self];
- if (experimental_flags::IsNativeAppLauncherEnabled())
- [self initNativeAppNavigationController];
-
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(applicationDidBecomeActive)
@@ -1550,41 +1535,6 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
return YES;
}
-- (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;
-
- id<NativeAppMetadata> metadata =
- [ios::GetChromeBrowserProvider()->GetNativeAppWhitelistManager()
- nativeAppForURL:url];
- 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];
- return NO;
-}
-
- (double)lastVisitedTimestamp {
return _lastVisitedTimestamp;
}
@@ -1844,23 +1794,6 @@ 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;
-}
-
-- (void)initNativeAppNavigationController {
- if (_browserState->IsOffTheRecord())
- return;
- DCHECK(!_nativeAppNavigationController);
- _nativeAppNavigationController =
- [[NativeAppNavigationController alloc] initWithWebState:self.webState];
- DCHECK(_nativeAppNavigationController);
-}
-
- (void)wasShown {
_visible = YES;
[self updateFullscreenWithToolbarVisible:YES];
« no previous file with comments | « ios/chrome/browser/tabs/tab.h ('k') | ios/chrome/browser/tabs/tab_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698