diff options
author | jwd@chromium.org <jwd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-28 19:35:04 +0000 |
---|---|---|
committer | jwd@chromium.org <jwd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-28 19:35:04 +0000 |
commit | 174a39dae2d8afa61e201fbc7651842bea882e97 (patch) | |
tree | 3e97d2982ce7c94b24805fdc0e0ce787084516c8 | |
parent | 67f977b493ae3a7ccb4707d8148cc6950ec46f1f (diff) | |
download | chromium_src-174a39dae2d8afa61e201fbc7651842bea882e97.zip chromium_src-174a39dae2d8afa61e201fbc7651842bea882e97.tar.gz chromium_src-174a39dae2d8afa61e201fbc7651842bea882e97.tar.bz2 |
Merge 184110
> Adding a histrogram to track account missmatch for signin reauth.
>
>
> BUG=174728
> TBR=sky@chromium.org
>
> Review URL: https://chromiumcodereview.appspot.com/12313012
TBR=jwd@chromium.org
Review URL: https://codereview.chromium.org/12380034
git-svn-id: svn://svn.chromium.org/chrome/branches/1410/src@185297 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/sync/one_click_signin_helper.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/sync/signin_histogram.h | 23 | ||||
-rw-r--r-- | chrome/browser/ui/webui/sync_setup_handler.cc | 5 | ||||
-rw-r--r-- | chrome/chrome_browser_ui.gypi | 1 |
4 files changed, 33 insertions, 0 deletions
diff --git a/chrome/browser/ui/sync/one_click_signin_helper.cc b/chrome/browser/ui/sync/one_click_signin_helper.cc index e5e5340..646304b 100644 --- a/chrome/browser/ui/sync/one_click_signin_helper.cc +++ b/chrome/browser/ui/sync/one_click_signin_helper.cc @@ -43,6 +43,7 @@ #include "chrome/browser/ui/sync/one_click_signin_histogram.h" #include "chrome/browser/ui/sync/one_click_signin_infobar_delegate.h" #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h" +#include "chrome/browser/ui/sync/signin_histogram.h" #include "chrome/browser/ui/tab_modal_confirm_dialog.h" #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h" #include "chrome/common/chrome_notification_types.h" @@ -558,6 +559,9 @@ bool OneClickSigninHelper::CanOffer(content::WebContents* web_contents, std::string current_email = manager->GetAuthenticatedUsername(); const bool same_email = gaia::AreEmailsSame(current_email, email); if (!current_email.empty() && !same_email) { + UMA_HISTOGRAM_ENUMERATION("Signin.Reauth", + signin::HISTOGRAM_ACCOUNT_MISSMATCH, + signin::HISTOGRAM_MAX); if (error_message) { error_message->assign( l10n_util::GetStringFUTF8(IDS_SYNC_WRONG_EMAIL, diff --git a/chrome/browser/ui/sync/signin_histogram.h b/chrome/browser/ui/sync/signin_histogram.h new file mode 100644 index 0000000..1137e4b --- /dev/null +++ b/chrome/browser/ui/sync/signin_histogram.h @@ -0,0 +1,23 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_SYNC_SIGNIN_HISTOGRAM_H_ +#define CHROME_BROWSER_UI_SYNC_SIGNIN_HISTOGRAM_H_ + +namespace signin { + +// Enum values used for use with the "Signin.Reauth" histogram. +enum account_reauth{ + // The user gave the wrong email when doing a reauth. + HISTOGRAM_ACCOUNT_MISSMATCH, + + // The user given a reauth login screen. + HISTOGRAM_SHOWN, + + HISTOGRAM_MAX +}; + +} + +#endif // CHROME_BROWSER_UI_SYNC_SIGNIN_HISTOGRAM_H_ diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc index fc40749..accb1fc2 100644 --- a/chrome/browser/ui/webui/sync_setup_handler.cc +++ b/chrome/browser/ui/webui/sync_setup_handler.cc @@ -12,6 +12,7 @@ #include "base/i18n/time_formatting.h" #include "base/json/json_reader.h" #include "base/json/json_writer.h" +#include "base/metrics/histogram.h" #include "base/prefs/pref_service.h" #include "base/utf_string_conversions.h" #include "base/values.h" @@ -28,6 +29,7 @@ #include "chrome/browser/sync/profile_sync_service_factory.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/browser_navigator.h" +#include "chrome/browser/ui/sync/signin_histogram.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/webui/signin/login_ui_service.h" #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" @@ -620,6 +622,9 @@ void SyncSetupHandler::DisplayGaiaLoginInNewTabOrWindow() { std::string email = SigninManagerFactory::GetForProfile( browser->profile())->GetAuthenticatedUsername(); if (!email.empty()) { + UMA_HISTOGRAM_ENUMERATION("Signin.Reauth", + signin::HISTOGRAM_SHOWN, + signin::HISTOGRAM_MAX); std::string fragment("Email="); fragment += email; GURL::Replacements replacements; diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi index 721befd..9acbbe9 100644 --- a/chrome/chrome_browser_ui.gypi +++ b/chrome/chrome_browser_ui.gypi @@ -1296,6 +1296,7 @@ 'browser/ui/sync/one_click_signin_infobar_delegate.h', 'browser/ui/sync/one_click_signin_sync_starter.cc', 'browser/ui/sync/one_click_signin_sync_starter.h', + 'browser/ui/sync/signin_histogram.h', 'browser/ui/sync/tab_contents_synced_tab_delegate.cc', 'browser/ui/sync/tab_contents_synced_tab_delegate.h', 'browser/ui/tab_contents/chrome_web_contents_view_delegate.h', |