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

Unified Diff: chrome/browser/ui/webui/welcome_handler.cc

Issue 2416333003: Adding Histograms for new Desktop First Run. (Closed)
Patch Set: Adding user action for impression Created 4 years, 2 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/ui/webui/welcome_handler.h ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/welcome_handler.cc
diff --git a/chrome/browser/ui/webui/welcome_handler.cc b/chrome/browser/ui/webui/welcome_handler.cc
index c6b91f6d312a5e533471516f7d3630e9bfd65035..ed67964c83d65ac68fe93dc20b8f9339d338fd2a 100644
--- a/chrome/browser/ui/webui/welcome_handler.cc
+++ b/chrome/browser/ui/webui/welcome_handler.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/ui/webui/welcome_handler.h"
+#include "base/metrics/histogram_macros.h"
+#include "base/metrics/user_metrics.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
@@ -26,7 +28,8 @@ WelcomeHandler::WelcomeHandler(content::WebUI* web_ui)
WelcomeHandler::~WelcomeHandler() {
oauth2_token_service_->RemoveObserver(this);
- // TODO(tmartino): Log to UMA according to WelcomeResult.
+ UMA_HISTOGRAM_ENUMERATION("Welcome.SignInPromptResult", result_,
+ WelcomeResult::WELCOME_RESULT_MAX);
}
// Override from OAuth2TokenService::Observer. Occurs when a new auth token is
@@ -45,6 +48,8 @@ void WelcomeHandler::HandleActivateSignIn(const base::ListValue* args) {
// them away to the NTP instead.
GoToNewTabPage();
} else {
+ base::RecordAction(
+ base::UserMetricsAction("Signin_Impression_FromStartPage"));
GetBrowser()->ShowModalSigninWindow(
profiles::BubbleViewMode::BUBBLE_VIEW_MODE_GAIA_SIGNIN,
signin_metrics::AccessPoint::ACCESS_POINT_START_PAGE);
« no previous file with comments | « chrome/browser/ui/webui/welcome_handler.h ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698