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

Unified Diff: chrome/browser/chromeos/arc/arc_auth_service.cc

Issue 2704383006: arc: Handle metrics for Auth operations. (Closed)
Patch Set: comments addressed Created 3 years, 10 months 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
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_service.h ('k') | chrome/browser/chromeos/arc/arc_optin_uma.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_auth_service.cc
diff --git a/chrome/browser/chromeos/arc/arc_auth_service.cc b/chrome/browser/chromeos/arc/arc_auth_service.cc
index 33a82f001cbe9adc2726f57d4ff0a363d47e2028..02efd3c1ef6aac4df10bff184667e8fd80b0bc3a 100644
--- a/chrome/browser/chromeos/arc/arc_auth_service.cc
+++ b/chrome/browser/chromeos/arc/arc_auth_service.cc
@@ -8,6 +8,7 @@
#include "base/command_line.h"
#include "base/memory/ptr_util.h"
+#include "base/time/time.h"
#include "chrome/browser/chromeos/arc/arc_optin_uma.h"
#include "chrome/browser/chromeos/arc/arc_session_manager.h"
#include "chrome/browser/chromeos/arc/auth/arc_active_directory_enrollment_token_fetcher.h"
@@ -176,6 +177,25 @@ void ArcAuthService::RequestAccountInfo() {
weak_ptr_factory_.GetWeakPtr())));
}
+void ArcAuthService::ReportMetrics(mojom::MetricsType metrics_type,
+ int32_t value) {
+ switch (metrics_type) {
+ case mojom::MetricsType::NETWORK_WAITING_TIME_MILLISECONDS:
+ UpdateAuthTiming("NetworkWaitTime",
dcheng 2017/02/23 20:12:36 I don't see Arc.Auth. prefix here, maybe wrong PS
khmel 2017/02/23 20:14:53 ArcAuth. is added at UpdateAuthTiming/UpdateAuthAt
+ base::TimeDelta::FromMilliseconds(value));
+ break;
+ case mojom::MetricsType::CHECKIN_ATTEMPTS:
+ UpdateAuthAttempts("CheckinAttempts", value);
+ break;
+ case mojom::MetricsType::CHECKIN_TIME_MILLISECONDS:
+ UpdateAuthTiming("CheckinTime", base::TimeDelta::FromMilliseconds(value));
+ break;
+ case mojom::MetricsType::SIGNIN_TIME_MILLISECONDS:
+ UpdateAuthTiming("SignInTime", base::TimeDelta::FromMilliseconds(value));
+ break;
+ }
+}
+
void ArcAuthService::OnAccountInfoReady(mojom::AccountInfoPtr account_info) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
auto* instance = ARC_GET_INSTANCE_FOR_METHOD(arc_bridge_service()->auth(),
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_service.h ('k') | chrome/browser/chromeos/arc/arc_optin_uma.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698