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

Unified Diff: chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.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_navigation_throttle.cc
diff --git a/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.cc b/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.cc
index f37ec9662af281cf761e8d9d467fc770b28efa74..a7a27fff9d0b79f3b8a4621219979bb68b5eebba 100644
--- a/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.cc
+++ b/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.cc
@@ -373,6 +373,23 @@ void ArcNavigationThrottle::OnIntentPickerClosed(
UMA_HISTOGRAM_ENUMERATION("Arc.IntentHandlerAction",
static_cast<int>(close_reason),
static_cast<int>(CloseReason::SIZE));
+
+ Platform platform =
+ GetDestinationPlatform(selected_app_package, close_reason);
+ UMA_HISTOGRAM_ENUMERATION("Arc.IntentHandlerDestinationPlatform",
+ static_cast<int>(platform),
+ static_cast<int>(Platform::SIZE));
+}
+
+// static
+ArcNavigationThrottle::Platform ArcNavigationThrottle::GetDestinationPlatform(
Yusuke Sato 2016/11/04 00:16:14 * Would you mind adding some unit tests for this?
djacobo_ 2016/11/04 05:53:50 Done.
+ const std::string& selected_app_package,
+ CloseReason close_reason) {
+ return (close_reason != CloseReason::ERROR &&
+ close_reason != CloseReason::DIALOG_DEACTIVATED &&
+ !ArcIntentHelperBridge::IsIntentHelperPackage(selected_app_package))
+ ? Platform::ARC
+ : Platform::CHROME;
}
// static

Powered by Google App Engine
This is Rietveld 408576698