Commit 4d425c09 authored by Daniel Blakemore's avatar Daniel Blakemore Committed by Commit Bot

Revert "Use new mailto handling setup API."

This reverts commit 20a36a40.

Reason for revert: New API fails under unrelated tests.  Rolling back to old API until this can be fixed.

Original change's description:
> Use new mailto handling setup API.
> 
> Re-lands https://chromium-review.googlesource.com/1031050 after
> fixes to downstream changes.
> 
> Bug: 810904
> Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
> Change-Id: I2cb00c90d6d35cb7c4dd5cb8ac7c5ffb8746894f
> Reviewed-on: https://chromium-review.googlesource.com/1033019
> Reviewed-by: Peter Lee <pkl@chromium.org>
> Commit-Queue: Daniel Blakemore <danblakemore@google.com>
> Cr-Commit-Position: refs/heads/master@{#554422}

TBR=pkl@chromium.org,danblakemore@google.com

Change-Id: Ib56bde2e2f8c608e67982507923110747e62f9fa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 810904
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Reviewed-on: https://chromium-review.googlesource.com/1033547Reviewed-by: default avatarPeter Lee <pkl@chromium.org>
Commit-Queue: Peter Lee <pkl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554537}
parent ce564240
...@@ -1126,19 +1126,24 @@ void MainControllerAuthenticationServiceDelegate::ClearBrowsingData( ...@@ -1126,19 +1126,24 @@ void MainControllerAuthenticationServiceDelegate::ClearBrowsingData(
- (void)initializeMailtoHandling { - (void)initializeMailtoHandling {
if (base::FeatureList::IsEnabled(kMailtoHandledWithGoogleUI)) { if (base::FeatureList::IsEnabled(kMailtoHandledWithGoogleUI)) {
__weak __typeof(self) weakSelf = self;
[[DeferredInitializationRunner sharedInstance] [[DeferredInitializationRunner sharedInstance]
enqueueBlockNamed:kMailtoHandlingInitialization enqueueBlockNamed:kMailtoHandlingInitialization
block:^{ block:^{
__strong __typeof(weakSelf) strongSelf = weakSelf;
if (!strongSelf) {
return;
}
MailtoHandlerProvider* provider = MailtoHandlerProvider* provider =
ios::GetChromeBrowserProvider() ios::GetChromeBrowserProvider()
->GetMailtoHandlerProvider(); ->GetMailtoHandlerProvider();
ios::ChromeIdentityService* identityService =
ios::GetChromeBrowserProvider()
->GetChromeIdentityService();
provider->PrepareMailtoHandling( provider->PrepareMailtoHandling(
strongSelf->_mainBrowserState); ^ChromeIdentity* {
// TODO:(crbug.com/810904) Replace with currently
// signed-in user.
return nil;
},
^NSArray<ChromeIdentity*>* {
return identityService->GetAllIdentities();
});
}]; }];
} }
} }
......
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