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 |