Commit eb89725d authored by Eugene But's avatar Eugene But Committed by Chromium LUCI CQ

[ios] Remove unused code from download_manager_coordinator.mm

This is a follow up cleanup to crrev.com/c/1884550 where
didFailOpenInMenuPresentation method call was removed.

Bug: None
Change-Id: I15f5f6982776681139397adbf937b28d6caea56e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2572781Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834328}
parent a489cfcd
......@@ -30,7 +30,6 @@
#include "ios/chrome/browser/overlays/public/overlay_callback_manager.h"
#import "ios/chrome/browser/overlays/public/overlay_request_queue.h"
#import "ios/chrome/browser/store_kit/store_kit_coordinator.h"
#import "ios/chrome/browser/ui/alert_coordinator/alert_coordinator.h"
#import "ios/chrome/browser/ui/commands/browser_coordinator_commands.h"
#import "ios/chrome/browser/ui/commands/command_dispatcher.h"
#import "ios/chrome/browser/ui/download/activities/open_downloads_folder_activity.h"
......@@ -173,10 +172,6 @@ class UnopenedDownloadsTracker : public web::DownloadTaskObserver,
UIActivityViewController* _openInController;
DownloadManagerMediator _mediator;
StoreKitCoordinator* _storeKitCoordinator;
// Coordinator for displaying the alert informing the user that no application
// on the device can open the file. The alert offers the user to install
// Google Drive app.
AlertCoordinator* _installDriveAlertCoordinator;
UnopenedDownloadsTracker _unopenedDownloads;
}
@end
......@@ -229,8 +224,6 @@ class UnopenedDownloadsTracker : public web::DownloadTaskObserver,
[_storeKitCoordinator stop];
_storeKitCoordinator = nil;
[_installDriveAlertCoordinator stop];
_installDriveAlertCoordinator = nil;
}
- (UIViewController*)viewController {
......@@ -417,38 +410,6 @@ class UnopenedDownloadsTracker : public web::DownloadTaskObserver,
DownloadFileUIGoogleDrive::Count);
}
// Called when Open In... menu was not presented. This method shows the alert
// which offers the user to install Google Drive app.
- (void)didFailOpenInMenuPresentation {
NSString* title =
l10n_util::GetNSString(IDS_IOS_DOWNLOAD_MANAGER_UNABLE_TO_OPEN_FILE);
NSString* message =
l10n_util::GetNSString(IDS_IOS_DOWNLOAD_MANAGER_NO_APP_MESSAGE);
_installDriveAlertCoordinator = [[AlertCoordinator alloc]
initWithBaseViewController:self.baseViewController
browser:self.browser
title:title
message:message];
NSString* googleDriveButtonTitle =
l10n_util::GetNSString(IDS_IOS_DOWNLOAD_MANAGER_UPLOAD_TO_GOOGLE_DRIVE);
__weak DownloadManagerCoordinator* weakSelf = self;
[_installDriveAlertCoordinator
addItemWithTitle:googleDriveButtonTitle
action:^{
[weakSelf presentStoreKitForGoogleDriveApp];
}
style:UIAlertActionStyleDefault];
[_installDriveAlertCoordinator
addItemWithTitle:l10n_util::GetNSString(IDS_CANCEL)
action:nil
style:UIAlertActionStyleCancel];
[_installDriveAlertCoordinator start];
}
// Presents StoreKit dialog for Google Drive application.
- (void)presentStoreKitForGoogleDriveApp {
if (!_storeKitCoordinator) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment