Chromium Code Reviews| Index: chrome/browser/chromeos/arc/intent_helper/arc_external_protocol_dialog.cc |
| diff --git a/chrome/browser/chromeos/arc/intent_helper/arc_external_protocol_dialog.cc b/chrome/browser/chromeos/arc/intent_helper/arc_external_protocol_dialog.cc |
| index f49f39f6e5b238741031a5bb3addcbba703ad0c2..a204e3ab4138e33fdef350bd2d727637a4f4e576 100644 |
| --- a/chrome/browser/chromeos/arc/intent_helper/arc_external_protocol_dialog.cc |
| +++ b/chrome/browser/chromeos/arc/intent_helper/arc_external_protocol_dialog.cc |
| @@ -40,10 +40,15 @@ constexpr uint32_t kMinVersionForHandleUrl = 2; |
| constexpr uint32_t kMinVersionForRequestUrlHandlerList = 2; |
| constexpr uint32_t kMinVersionForAddPreferredPackage = 7; |
| -void RecordUma(ArcNavigationThrottle::CloseReason close_reason) { |
| +void RecordUma(ArcNavigationThrottle::CloseReason close_reason, |
| + ArcNavigationThrottle::Platform platform) { |
| UMA_HISTOGRAM_ENUMERATION( |
| "Arc.IntentHandlerAction", static_cast<int>(close_reason), |
| static_cast<int>(ArcNavigationThrottle::CloseReason::SIZE)); |
| + |
| + UMA_HISTOGRAM_ENUMERATION( |
| + "Arc.IntentHandlerSelectedPlatform", static_cast<int>(platform), |
|
elijahtaylor1
2016/11/03 22:22:00
nit: calling it Selected (here and elsewhere) seem
djacobo_
2016/11/03 23:13:55
Makes sense. Done.
|
| + static_cast<int>(ArcNavigationThrottle::Platform::SIZE)); |
| } |
| // Shows the Chrome OS' original external protocol dialog as a fallback. |
| @@ -271,7 +276,11 @@ void OnIntentPickerClosed(int render_process_host_id, |
| break; |
| } |
| } |
| - RecordUma(close_reason); |
| + |
| + ArcNavigationThrottle::Platform platform = |
| + ArcNavigationThrottle::GetSelectedPlatform(selected_app_package, |
| + close_reason); |
| + RecordUma(close_reason, platform); |
| } |
| // Called when ARC returned activity icons for the |handlers|. |
| @@ -324,8 +333,10 @@ void OnUrlHandlerList(int render_process_host_id, |
| GetActionResult result; |
| if (HandleUrl(render_process_host_id, routing_id, url, handlers, |
| handlers.size(), &result)) { |
| - if (result == GetActionResult::HANDLE_URL_IN_ARC) |
| - RecordUma(ArcNavigationThrottle::CloseReason::PREFERRED_ACTIVITY_FOUND); |
| + RecordUma(ArcNavigationThrottle::CloseReason::PREFERRED_ACTIVITY_FOUND, |
|
djacobo_
2016/11/03 22:11:54
I assumed we would like to track as PREFERRED also
elijahtaylor1
2016/11/03 22:22:00
Ah, this is interesting that we were only setting
djacobo_
2016/11/03 23:13:55
Alright, let me add a comment in the related histo
|
| + result == GetActionResult::HANDLE_URL_IN_ARC |
| + ? ArcNavigationThrottle::Platform::ARC |
| + : ArcNavigationThrottle::Platform::CHROME); |
| return; // the |url| has been handled. |
| } |