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

Unified Diff: ios/chrome/browser/web/mailto_url_rewriter.mm

Issue 2904663003: Revert to system Mail app if current default Mail app is no longer there (Closed)
Patch Set: clarified a comment Created 3 years, 7 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/web/mailto_url_rewriter.mm
diff --git a/ios/chrome/browser/web/mailto_url_rewriter.mm b/ios/chrome/browser/web/mailto_url_rewriter.mm
index e264b91c5f4573e0f67f54d340a2a5180f2ffd32..e6fcd7a4de4697154b8d093b0c9db147b70a7590 100644
--- a/ios/chrome/browser/web/mailto_url_rewriter.mm
+++ b/ios/chrome/browser/web/mailto_url_rewriter.mm
@@ -90,7 +90,9 @@ NSString* const kMailtoDefaultHandlerKey = @"MailtoHandlerDefault";
- (NSString*)defaultHandlerID {
NSString* value = [[NSUserDefaults standardUserDefaults]
stringForKey:kMailtoDefaultHandlerKey];
- return value ? value : [[self class] systemMailApp];
+ if ([_handlers[value] isAvailable])
+ return value;
+ return [[self class] systemMailApp];
}
- (void)setDefaultHandlerID:(NSString*)appStoreID {
« no previous file with comments | « ios/chrome/browser/web/mailto_url_rewriter.h ('k') | ios/chrome/browser/web/mailto_url_rewriter_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698