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

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

Issue 338993007: Track when and how a profile is signed out via UMA. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: SignOut() param in Android tests Created 6 years, 6 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
Index: chrome/browser/ui/webui/sync_setup_handler.cc
diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc
index 0836aadfec39a04a67c5169a8f7f0fd72a370ef7..1534958468c0c77ab0e007d9a61377402f59463e 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -42,6 +42,7 @@
#include "components/google/core/browser/google_util.h"
#include "components/signin/core/browser/profile_oauth2_token_service.h"
#include "components/signin/core/browser/signin_error_controller.h"
+#include "components/signin/core/browser/signin_metrics.h"
#include "components/signin/core/common/profile_management_switches.h"
#include "components/sync_driver/sync_prefs.h"
#include "content/public/browser/render_view_host.h"
@@ -805,7 +806,8 @@ void SyncSetupHandler::HandleStartSignin(const base::ListValue* args) {
void SyncSetupHandler::HandleStopSyncing(const base::ListValue* args) {
if (GetSyncService())
ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS);
- SigninManagerFactory::GetForProfile(GetProfile())->SignOut();
+ SigninManagerFactory::GetForProfile(GetProfile())->SignOut(
+ signin_metrics::USER_CLICKED_SIGNOUT_SETTINGS);
bool delete_profile = false;
if (args->GetBoolean(0, &delete_profile) && delete_profile) {
@@ -849,8 +851,10 @@ void SyncSetupHandler::CloseSyncSetup() {
// Sign out the user on desktop Chrome if they click cancel during
// initial setup.
// TODO(rsimha): Revisit this for M30. See http://crbug.com/252049.
- if (sync_service->FirstSetupInProgress())
- SigninManagerFactory::GetForProfile(GetProfile())->SignOut();
+ if (sync_service->FirstSetupInProgress()) {
+ SigninManagerFactory::GetForProfile(GetProfile())->SignOut(
+ signin_metrics::ABORT_SIGNIN);
+ }
#endif
}
}
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_sync_starter.cc ('k') | chrome/browser/ui/webui/sync_setup_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698