| 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..d868bee14d945b8c6ce500011a1565e6bef7150b 100644
|
| --- a/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.cc
|
| +++ b/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.cc
|
| @@ -370,9 +370,9 @@ 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);
|
| + RecordUma(close_reason, platform);
|
| }
|
|
|
| // static
|
| @@ -387,6 +387,29 @@ size_t ArcNavigationThrottle::GetAppIndex(
|
| }
|
|
|
| // static
|
| +ArcNavigationThrottle::Platform ArcNavigationThrottle::GetDestinationPlatform(
|
| + 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
|
| +void ArcNavigationThrottle::RecordUma(CloseReason close_reason,
|
| + Platform platform) {
|
| + UMA_HISTOGRAM_ENUMERATION("Arc.IntentHandlerAction",
|
| + static_cast<int>(close_reason),
|
| + static_cast<int>(CloseReason::SIZE));
|
| +
|
| + UMA_HISTOGRAM_ENUMERATION("Arc.IntentHandlerDestinationPlatform",
|
| + static_cast<int>(platform),
|
| + static_cast<int>(Platform::SIZE));
|
| +}
|
| +
|
| +// static
|
| bool ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
|
| const GURL& previous_url,
|
| const GURL& current_url) {
|
|
|