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

Unified Diff: chrome/browser/ui/sync/one_click_signin_sync_starter.cc

Issue 2771233002: Remove the wrapper functions content::RecordAction et al (Closed)
Patch Set: Rebased Created 3 years, 9 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/startup/startup_browser_creator.cc ('k') | chrome/browser/ui/tabs/tab_strip_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/sync/one_click_signin_sync_starter.cc
diff --git a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
index 6f89100aa541ba494df5622c25b6e20d03663bd2..8bfffabb5327d6c51c8ea48633f726768b4f006e 100644
--- a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
+++ b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
@@ -7,6 +7,7 @@
#include <stddef.h>
#include "base/metrics/histogram_macros.h"
+#include "base/metrics/user_metrics.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/policy/cloud/user_policy_signin_service.h"
@@ -39,7 +40,6 @@
#include "components/signin/core/browser/signin_metrics.h"
#include "components/signin/core/common/profile_management_switches.h"
#include "components/sync/base/sync_prefs.h"
-#include "content/public/browser/user_metrics.h"
#include "net/base/url_util.h"
#include "net/url_request/url_request_context_getter.h"
#include "ui/base/l10n/l10n_util.h"
@@ -187,7 +187,7 @@ OneClickSigninSyncStarter::SigninDialogDelegate::~SigninDialogDelegate() {
void OneClickSigninSyncStarter::SigninDialogDelegate::OnCancelSignin() {
SetUserChoiceHistogram(SIGNIN_CHOICE_CANCEL);
- content::RecordAction(
+ base::RecordAction(
base::UserMetricsAction("Signin_EnterpriseAccountPrompt_Cancel"));
if (sync_starter_)
sync_starter_->CancelSigninAndDelete();
@@ -195,7 +195,7 @@ void OneClickSigninSyncStarter::SigninDialogDelegate::OnCancelSignin() {
void OneClickSigninSyncStarter::SigninDialogDelegate::OnContinueSignin() {
SetUserChoiceHistogram(SIGNIN_CHOICE_CONTINUE);
- content::RecordAction(
+ base::RecordAction(
base::UserMetricsAction("Signin_EnterpriseAccountPrompt_ImportData"));
if (sync_starter_)
@@ -204,7 +204,7 @@ void OneClickSigninSyncStarter::SigninDialogDelegate::OnContinueSignin() {
void OneClickSigninSyncStarter::SigninDialogDelegate::OnSigninWithNewProfile() {
SetUserChoiceHistogram(SIGNIN_CHOICE_NEW_PROFILE);
- content::RecordAction(
+ base::RecordAction(
base::UserMetricsAction("Signin_EnterpriseAccountPrompt_DontImportData"));
if (sync_starter_)
@@ -239,7 +239,7 @@ void OneClickSigninSyncStarter::OnRegisteredForPolicy(
return;
}
- content::RecordAction(
+ base::RecordAction(
base::UserMetricsAction("Signin_Show_EnterpriseAccountPrompt"));
TabDialogs::FromWebContents(web_contents)
->ShowProfileSigninConfirmation(browser_, profile_,
@@ -378,7 +378,7 @@ void OneClickSigninSyncStarter::ConfirmAndSignin() {
SigninManager* signin = SigninManagerFactory::GetForProfile(profile_);
if (confirmation_required_ == CONFIRM_UNTRUSTED_SIGNIN) {
browser_ = EnsureBrowser(browser_, profile_);
- content::RecordAction(
+ base::RecordAction(
base::UserMetricsAction("Signin_Show_UntrustedSigninPrompt"));
// Display a confirmation dialog to the user.
browser_->window()->ShowOneClickSigninConfirmation(
@@ -394,7 +394,7 @@ void OneClickSigninSyncStarter::ConfirmAndSignin() {
void OneClickSigninSyncStarter::UntrustedSigninConfirmed(
StartSyncMode response) {
if (response == UNDO_SYNC) {
- content::RecordAction(base::UserMetricsAction("Signin_Undo_Signin"));
+ base::RecordAction(base::UserMetricsAction("Signin_Undo_Signin"));
CancelSigninAndDelete(); // This statement frees this object.
} else {
// If the user clicked the "Advanced" link in the confirmation dialog, then
@@ -426,12 +426,12 @@ void OneClickSigninSyncStarter::OnSyncConfirmationUIClosed(
switch (result) {
case LoginUIService::CONFIGURE_SYNC_FIRST:
- content::RecordAction(
+ base::RecordAction(
base::UserMetricsAction("Signin_Signin_WithAdvancedSyncSettings"));
chrome::ShowSettingsSubPage(browser_, chrome::kSyncSetupSubPage);
break;
case LoginUIService::SYNC_WITH_DEFAULT_SETTINGS: {
- content::RecordAction(
+ base::RecordAction(
base::UserMetricsAction("Signin_Signin_WithDefaultSyncSettings"));
ProfileSyncService* profile_sync_service = GetProfileSyncService();
if (profile_sync_service)
@@ -478,7 +478,7 @@ void OneClickSigninSyncStarter::SigninSuccess() {
signin::GetAccessPointForPromoURL(current_url_));
signin_metrics::LogSigninReason(
signin::GetSigninReasonForPromoURL(current_url_));
- content::RecordAction(base::UserMetricsAction("Signin_Signin_Succeed"));
+ base::RecordAction(base::UserMetricsAction("Signin_Signin_Succeed"));
}
void OneClickSigninSyncStarter::AccountAddedToCookie(
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator.cc ('k') | chrome/browser/ui/tabs/tab_strip_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698