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

Unified Diff: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm

Issue 296023003: Apply upgrade_enrollment Profile metrics to Mac Desktop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and compile Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698