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

Unified Diff: chrome/browser/chromeos/arc/intent_helper/arc_external_protocol_dialog.cc

Issue 2476783002: Adding a destination platform histogram for UMA. (Closed)
Patch Set: Replacing 'selected' to 'destination', adding a note to the ArcIntentHandlerAction histogram Created 4 years, 1 month 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: 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..f7010b60386db176a6ac8dbc4d2d0d294a78c786 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.IntentHandlerDestinationPlatform", static_cast<int>(platform),
+ 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::GetDestinationPlatform(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,
Yusuke Sato 2016/11/04 00:16:14 When there's no app that can handle the custom |ur
djacobo_ 2016/11/04 05:53:50 Makes sense, let me rollback the comments on histo
+ result == GetActionResult::HANDLE_URL_IN_ARC
Yusuke Sato 2016/11/04 00:16:14 Sorry that the enum does not have descriptions (pl
djacobo_ 2016/11/04 05:53:50 Ok, so if I understand correctly I could Use the c
Yusuke Sato 2016/11/04 16:18:06 Re FALLBACK_STRING_USED, I'd defer the decision to
djacobo_ 2016/11/04 17:43:43 Acknowledged.
elijahtaylor (use chromium) 2016/11/04 20:26:19 fallback string in a different CL sgtm Just to cl
Yusuke Sato 2016/11/04 20:42:33 If Chrome is used as the default (aka Always) when
+ ? ArcNavigationThrottle::Platform::ARC
+ : ArcNavigationThrottle::Platform::CHROME);
return; // the |url| has been handled.
}

Powered by Google App Engine
This is Rietveld 408576698