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

Issue 2852003002: Adds mailto: URL support to app launching. (Closed)

Created:
3 years, 7 months ago by pkl (ping after 24h if needed)
Modified:
3 years, 7 months ago
CC:
chromium-reviews, marq+watch_chromium.org, ios-reviews+chrome_chromium.org, noyau+watch_chromium.org, ios-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Adds mailto: URL support to app launching. Known Mail client apps are managed by a singleton class of MailtoURLRewriter. This CL adds support for the default system Mail client app and also for Gmail. BUG=711511 NOTRY=true Review-Url: https://codereview.chromium.org/2852003002 Cr-Commit-Position: refs/heads/master@{#470544} Committed: https://chromium.googlesource.com/chromium/src/+/94313a25439ae14d5544311a274e160f41334769

Patch Set 1 #

Patch Set 2 : use ARC for unit tests #

Patch Set 3 : added metrics and localization #

Patch Set 4 : .grd message update #

Total comments: 12

Patch Set 5 : No singletons #

Patch Set 6 : rebase #

Patch Set 7 : rebase #

Total comments: 16

Patch Set 8 : address jif comments #

Patch Set 9 : improved desc= in ios_strings.grd #

Patch Set 10 : fixed lack of persistency of setDefaultHandlerID: #

Total comments: 10

Patch Set 11 : Use @property. Added comments. #

Patch Set 12 : clean up convertLegacyOptions logic some more #

Total comments: 6

Patch Set 13 : addressed comments from rohitrao and asvitkine #

Total comments: 2

Patch Set 14 : addressed one more question from rohitrao #

Patch Set 15 : reorganized logic in convertLegacyOptions #

Patch Set 16 : moved mailto*.{h,mm} to "web" target in BUILD.gn #

Patch Set 17 : cleanup comments for convertLegacyOptions #

Patch Set 18 : s/convertLegacyOptions/migrateLegacyOptions/. Less code. #

Total comments: 10

Patch Set 19 : fixing comments and separating migration from autoDefault. #

Patch Set 20 : separate migration from auto-default even more #

Unified diffs Side-by-side diffs Delta from patch set Stats (+802 lines, -2 lines) Patch
M ios/chrome/app/strings/ios_strings.grd View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M ios/chrome/browser/web/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +15 lines, -1 line 0 comments Download
M ios/chrome/browser/web/external_app_launcher.mm View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +15 lines, -1 line 0 comments Download
A ios/chrome/browser/web/mailto_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +46 lines, -0 lines 0 comments Download
A ios/chrome/browser/web/mailto_handler.mm View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +68 lines, -0 lines 0 comments Download
A ios/chrome/browser/web/mailto_handler_gmail.h View 1 chunk +14 lines, -0 lines 0 comments Download
A ios/chrome/browser/web/mailto_handler_gmail.mm View 1 2 3 4 5 6 7 1 chunk +28 lines, -0 lines 0 comments Download
A ios/chrome/browser/web/mailto_handler_gmail_unittest.mm View 1 2 3 4 1 chunk +20 lines, -0 lines 0 comments Download
A ios/chrome/browser/web/mailto_handler_system_mail.h View 1 chunk +14 lines, -0 lines 0 comments Download
A ios/chrome/browser/web/mailto_handler_system_mail.mm View 1 2 3 4 5 6 7 1 chunk +36 lines, -0 lines 0 comments Download
A ios/chrome/browser/web/mailto_handler_system_mail_unittest.mm View 1 1 chunk +29 lines, -0 lines 0 comments Download
A ios/chrome/browser/web/mailto_handler_unittest.mm View 1 2 3 4 5 6 7 1 chunk +45 lines, -0 lines 0 comments Download
A ios/chrome/browser/web/mailto_url_rewriter.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +41 lines, -0 lines 0 comments Download
A ios/chrome/browser/web/mailto_url_rewriter.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +206 lines, -0 lines 0 comments Download
A ios/chrome/browser/web/mailto_url_rewriter_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +214 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +8 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 39 (12 generated)
pkl (ping after 24h if needed)
Adds a modular approach to mailto: handlers. This adds one for the system-provided Mail app ...
3 years, 7 months ago (2017-05-03 00:21:35 UTC) #3
jif
First quick pass https://codereview.chromium.org/2852003002/diff/60001/ios/chrome/browser/web/external_app_launcher.mm File ios/chrome/browser/web/external_app_launcher.mm (right): https://codereview.chromium.org/2852003002/diff/60001/ios/chrome/browser/web/external_app_launcher.mm#newcode195 ios/chrome/browser/web/external_app_launcher.mm:195: [[MailtoURLRewriter sharedInstance] rewriteMailtoURL:gURL]; MailtoURLRewriter doesn't have ...
3 years, 7 months ago (2017-05-03 13:01:35 UTC) #4
pkl (ping after 24h if needed)
jif: I believe that I've addressed your comments. https://codereview.chromium.org/2852003002/diff/60001/ios/chrome/browser/web/external_app_launcher.mm File ios/chrome/browser/web/external_app_launcher.mm (right): https://codereview.chromium.org/2852003002/diff/60001/ios/chrome/browser/web/external_app_launcher.mm#newcode195 ios/chrome/browser/web/external_app_launcher.mm:195: [[MailtoURLRewriter ...
3 years, 7 months ago (2017-05-03 22:17:18 UTC) #5
jif
https://codereview.chromium.org/2852003002/diff/60001/ios/chrome/browser/web/mailto_handler.h File ios/chrome/browser/web/mailto_handler.h (right): https://codereview.chromium.org/2852003002/diff/60001/ios/chrome/browser/web/mailto_handler.h#newcode28 ios/chrome/browser/web/mailto_handler.h:28: - (BOOL)isAvailable; On 2017/05/03 22:17:18, pkl -pls.ping.after.24h. wrote: > ...
3 years, 7 months ago (2017-05-04 14:08:47 UTC) #6
pkl (ping after 24h if needed)
jif: Your comments addressed. rohitrao: Please do an OWNERS-review. asvitkine: Please review tools/metrics/histograms/histograms.xml https://codereview.chromium.org/2852003002/diff/120001/ios/chrome/browser/web/mailto_handler.h File ...
3 years, 7 months ago (2017-05-04 22:25:59 UTC) #8
jif
https://codereview.chromium.org/2852003002/diff/60001/ios/chrome/browser/web/mailto_handler.h File ios/chrome/browser/web/mailto_handler.h (right): https://codereview.chromium.org/2852003002/diff/60001/ios/chrome/browser/web/mailto_handler.h#newcode28 ios/chrome/browser/web/mailto_handler.h:28: - (BOOL)isAvailable; On 2017/05/04 14:08:47, jif wrote: > On ...
3 years, 7 months ago (2017-05-05 09:49:39 UTC) #9
pkl (ping after 24h if needed)
On 2017/05/05 09:49:39, jif wrote: > https://codereview.chromium.org/2852003002/diff/60001/ios/chrome/browser/web/mailto_handler.h > File ios/chrome/browser/web/mailto_handler.h (right): > > https://codereview.chromium.org/2852003002/diff/60001/ios/chrome/browser/web/mailto_handler.h#newcode28 > ...
3 years, 7 months ago (2017-05-05 13:15:09 UTC) #10
pkl (ping after 24h if needed)
On 2017/05/05 13:15:09, pkl -pls.ping.after.24h. wrote: > On 2017/05/05 09:49:39, jif wrote: > > > ...
3 years, 7 months ago (2017-05-05 13:17:04 UTC) #11
jif
lgtm
3 years, 7 months ago (2017-05-05 15:56:42 UTC) #12
rohitrao (ping after 24h)
https://codereview.chromium.org/2852003002/diff/180001/ios/chrome/browser/web/mailto_handler_system_mail.h File ios/chrome/browser/web/mailto_handler_system_mail.h (right): https://codereview.chromium.org/2852003002/diff/180001/ios/chrome/browser/web/mailto_handler_system_mail.h#newcode11 ios/chrome/browser/web/mailto_handler_system_mail.h:11: @interface MailtoHandlerSystemMail : MailtoHandler Why do we maintain a ...
3 years, 7 months ago (2017-05-06 00:09:41 UTC) #13
Alexei Svitkine (slow)
https://codereview.chromium.org/2852003002/diff/220001/ios/chrome/browser/web/external_app_launcher.mm File ios/chrome/browser/web/external_app_launcher.mm (right): https://codereview.chromium.org/2852003002/diff/220001/ios/chrome/browser/web/external_app_launcher.mm#newcode201 ios/chrome/browser/web/external_app_launcher.mm:201: UMA_HISTOGRAM_BOOLEAN("MailtoURLRewriter.Rewritten", false); Each UMA macro expands to a bunch ...
3 years, 7 months ago (2017-05-08 14:56:01 UTC) #14
Alexei Svitkine (slow)
3 years, 7 months ago (2017-05-08 14:56:02 UTC) #15
pkl (ping after 24h if needed)
rohitrao & asvitkine: Addressed your comments. PTAL. https://codereview.chromium.org/2852003002/diff/180001/ios/chrome/browser/web/mailto_handler_system_mail.h File ios/chrome/browser/web/mailto_handler_system_mail.h (right): https://codereview.chromium.org/2852003002/diff/180001/ios/chrome/browser/web/mailto_handler_system_mail.h#newcode11 ios/chrome/browser/web/mailto_handler_system_mail.h:11: @interface MailtoHandlerSystemMail ...
3 years, 7 months ago (2017-05-08 17:07:56 UTC) #16
Alexei Svitkine (slow)
lgtm
3 years, 7 months ago (2017-05-08 18:49:28 UTC) #17
rohitrao (ping after 24h)
https://codereview.chromium.org/2852003002/diff/240001/ios/chrome/browser/web/mailto_url_rewriter.mm File ios/chrome/browser/web/mailto_url_rewriter.mm (right): https://codereview.chromium.org/2852003002/diff/240001/ios/chrome/browser/web/mailto_url_rewriter.mm#newcode155 ios/chrome/browser/web/mailto_url_rewriter.mm:155: [defaults removeObjectForKey:kMailtoDefaultHandlerKey]; In what cases could this line (and ...
3 years, 7 months ago (2017-05-08 18:57:50 UTC) #18
pkl (ping after 24h if needed)
https://codereview.chromium.org/2852003002/diff/240001/ios/chrome/browser/web/mailto_url_rewriter.mm File ios/chrome/browser/web/mailto_url_rewriter.mm (right): https://codereview.chromium.org/2852003002/diff/240001/ios/chrome/browser/web/mailto_url_rewriter.mm#newcode155 ios/chrome/browser/web/mailto_url_rewriter.mm:155: [defaults removeObjectForKey:kMailtoDefaultHandlerKey]; On 2017/05/08 18:57:50, rohitrao (ping after 24h) ...
3 years, 7 months ago (2017-05-08 22:15:43 UTC) #19
pkl (ping after 24h if needed)
rohitrao: Please review patchset 15-18. I've renamed convertLegacyOptions to migrateLegacyOptions because the name is a ...
3 years, 7 months ago (2017-05-09 23:44:10 UTC) #20
rohitrao (ping after 24h)
https://codereview.chromium.org/2852003002/diff/340001/ios/chrome/browser/web/mailto_url_rewriter.mm File ios/chrome/browser/web/mailto_url_rewriter.mm (right): https://codereview.chromium.org/2852003002/diff/340001/ios/chrome/browser/web/mailto_url_rewriter.mm#newcode190 ios/chrome/browser/web/mailto_url_rewriter.mm:190: // For users who have not made an explict ...
3 years, 7 months ago (2017-05-09 23:52:21 UTC) #21
pkl (ping after 24h if needed)
Mostly answering your questions at this time. I will upload a patch with the typo ...
3 years, 7 months ago (2017-05-10 00:02:19 UTC) #22
rohitrao (ping after 24h)
Ok, lgtm https://codereview.chromium.org/2852003002/diff/340001/ios/chrome/browser/web/mailto_url_rewriter.mm File ios/chrome/browser/web/mailto_url_rewriter.mm (right): https://codereview.chromium.org/2852003002/diff/340001/ios/chrome/browser/web/mailto_url_rewriter.mm#newcode105 ios/chrome/browser/web/mailto_url_rewriter.mm:105: + (void)resetDefaultHandlerID { What code will call ...
3 years, 7 months ago (2017-05-10 00:09:18 UTC) #23
pkl (ping after 24h if needed)
Thank you! https://codereview.chromium.org/2852003002/diff/340001/ios/chrome/browser/web/mailto_url_rewriter.mm File ios/chrome/browser/web/mailto_url_rewriter.mm (right): https://codereview.chromium.org/2852003002/diff/340001/ios/chrome/browser/web/mailto_url_rewriter.mm#newcode105 ios/chrome/browser/web/mailto_url_rewriter.mm:105: + (void)resetDefaultHandlerID { On 2017/05/10 00:09:18, rohitrao ...
3 years, 7 months ago (2017-05-10 01:04:14 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2852003002/380001
3 years, 7 months ago (2017-05-10 01:05:40 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; ...
3 years, 7 months ago (2017-05-10 03:08:38 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2852003002/380001
3 years, 7 months ago (2017-05-10 03:12:42 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/449613)
3 years, 7 months ago (2017-05-10 07:21:39 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2852003002/380001
3 years, 7 months ago (2017-05-10 12:47:47 UTC) #36
commit-bot: I haz the power
3 years, 7 months ago (2017-05-10 12:53:33 UTC) #39
Message was sent while issue was closed.
Committed patchset #20 (id:380001) as
https://chromium.googlesource.com/chromium/src/+/94313a25439ae14d5544311a274e...

Powered by Google App Engine
This is Rietveld 408576698