Index: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm |
diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm |
index a79c2a2348e0ec4e2aadeb56bff9d84f2e390c9d..1320999a08863eeea81f9939597ebab96e6c0629 100644 |
--- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm |
+++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm |
@@ -822,6 +822,8 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver, |
} |
- (IBAction)openTutorialLearnMoreURL:(id)sender { |
+ ProfileMetrics::LogProfileUpgradeEnrollment( |
+ ProfileMetrics::PROFILE_ENROLLMENT_LAUNCH_LEARN_MORE); |
// TODO(guohui): update |learnMoreUrl| once it is decided. |
const GURL learnMoreUrl("https://support.google.com/chrome/?hl=en#to"); |
chrome::NavigateParams params(browser_->profile(), learnMoreUrl, |
@@ -831,10 +833,14 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver, |
} |
- (IBAction)enableNewProfileManagementPreview:(id)sender { |
+ ProfileMetrics::LogProfileUpgradeEnrollment( |
+ ProfileMetrics::PROFILE_ENROLLMENT_ACCEPT_NEW_PROFILE_MGMT); |
profiles::EnableNewProfileManagementPreview(); |
} |
- (IBAction)dismissTutorial:(id)sender { |
+ ProfileMetrics::LogProfileUpgradeEnrollment( |
+ ProfileMetrics::PROFILE_ENROLLMENT_CLOSE_WELCOME_CARD); |
// If the user manually dismissed the tutorial, never show it again by setting |
// the number of times shown to the maximum plus 1, so that later we could |
// distinguish between the dismiss case and the case when the tutorial is |
@@ -845,6 +851,8 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver, |
} |
- (IBAction)showSendFeedbackTutorial:(id)sender { |
+ ProfileMetrics::LogProfileUpgradeEnrollment( |
+ ProfileMetrics::PROFILE_ENROLLMENT_SEND_FEEDBACK); |
tutorialMode_ = profiles::TUTORIAL_MODE_SEND_FEEDBACK; |
[self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER]; |
} |
@@ -939,6 +947,8 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver, |
[[NSMutableArray alloc] init]); |
// Local and guest profiles cannot lock their profile. |
bool enableLock = false; |
+ // Store the most recently displayed tutorial mode |
+ profiles::TutorialMode lastTutorialMode = tutorialMode_; |
// Loop over the profiles in reverse, so that they are sorted by their |
// y-coordinate, and separate them into active and "other" profiles. |
@@ -1011,6 +1021,11 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver, |
[tutorialView setFrameOrigin:NSMakePoint(0, yOffset)]; |
[container addSubview:tutorialView]; |
yOffset = NSMaxY([tutorialView frame]); |
+ if (!switches::IsNewProfileManagement() && |
+ tutorialMode_ != lastTutorialMode) { |
+ ProfileMetrics::LogProfileUpgradeEnrollment( |
+ ProfileMetrics::PROFILE_ENROLLMENT_SHOW_PREVIEW_PROMO); |
+ } |
} else { |
tutorialMode_ = profiles::TUTORIAL_MODE_NONE; |
} |