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

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

Issue 2476783002: Adding a destination platform histogram for UMA. (Closed)
Patch Set: Style fixes, git cl lint/format 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..81affe28a0244dea3d3cdc5a0f860ccccfcc199c 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,12 @@ 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
@@ -387,6 +393,17 @@ 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
bool ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
const GURL& previous_url,
const GURL& current_url) {

Powered by Google App Engine
This is Rietveld 408576698