Commit 0c2e5cf3 authored by mlerman@chromium.org's avatar mlerman@chromium.org

Apply upgrade_enrollment Profile metrics to Mac Desktop.

BUG=357693

Review URL: https://codereview.chromium.org/296023003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272909 0039d316-1c4b-4281-b951-d872f2087c98
parent aba38b8b
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment