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

Side by Side Diff: chrome/browser/profiles/profile_metrics.cc

Issue 470643002: Add metrics to the new ProfileChooser Tutorials (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Browser tests pending Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/profile_metrics.h" 5 #include "chrome/browser/profiles/profile_metrics.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 UMA_HISTOGRAM_ENUMERATION("Profile.DesktopMenu.GAIADefault", metric, 358 UMA_HISTOGRAM_ENUMERATION("Profile.DesktopMenu.GAIADefault", metric,
359 NUM_PROFILE_DESKTOP_MENU_METRICS); 359 NUM_PROFILE_DESKTOP_MENU_METRICS);
360 break; 360 break;
361 } 361 }
362 } 362 }
363 363
364 void ProfileMetrics::LogProfileDelete(bool profile_was_signed_in) { 364 void ProfileMetrics::LogProfileDelete(bool profile_was_signed_in) {
365 UMA_HISTOGRAM_BOOLEAN("Profile.Delete", profile_was_signed_in); 365 UMA_HISTOGRAM_BOOLEAN("Profile.Delete", profile_was_signed_in);
366 } 366 }
367 367
368 void ProfileMetrics::LogProfileNewAvatarMenuNotYou(
369 ProfileNewAvatarMenuNotYou metric) {
370 DCHECK_LT(metric, NUM_PROFILE_AVATAR_MENU_NOT_YOU_METRICS);
371 UMA_HISTOGRAM_ENUMERATION("Profile.NewAvatarMenu.NotYou", metric,
372 NUM_PROFILE_AVATAR_MENU_NOT_YOU_METRICS);
373 }
374
375 void ProfileMetrics::LogProfileNewAvatarMenuSignin(
376 ProfileNewAvatarMenuSignin metric) {
377 DCHECK_LT(metric, NUM_PROFILE_AVATAR_MENU_SIGNIN_METRICS);
378 UMA_HISTOGRAM_ENUMERATION("Profile.NewAvatarMenu.Signin", metric,
379 NUM_PROFILE_AVATAR_MENU_SIGNIN_METRICS);
380 }
381
382 void ProfileMetrics::LogProfileNewAvatarMenuUpgrade(
383 ProfileNewAvatarMenuUpgrade metric) {
384 DCHECK_LT(metric, NUM_PROFILE_AVATAR_MENU_UPGRADE_METRICS);
385 UMA_HISTOGRAM_ENUMERATION("Profile.NewAvatarMenu.Upgrade", metric,
386 NUM_PROFILE_AVATAR_MENU_UPGRADE_METRICS);
387 }
388
368 #if defined(OS_ANDROID) 389 #if defined(OS_ANDROID)
369 void ProfileMetrics::LogProfileAndroidAccountManagementMenu( 390 void ProfileMetrics::LogProfileAndroidAccountManagementMenu(
370 ProfileAndroidAccountManagementMenu metric, 391 ProfileAndroidAccountManagementMenu metric,
371 signin::GAIAServiceType gaia_service) { 392 signin::GAIAServiceType gaia_service) {
372 // The first parameter to the histogram needs to be literal, because of the 393 // The first parameter to the histogram needs to be literal, because of the
373 // optimized implementation of |UMA_HISTOGRAM_ENUMERATION|. Do not attempt 394 // optimized implementation of |UMA_HISTOGRAM_ENUMERATION|. Do not attempt
374 // to refactor. 395 // to refactor.
375 switch (gaia_service) { 396 switch (gaia_service) {
376 case signin::GAIA_SERVICE_TYPE_NONE: 397 case signin::GAIA_SERVICE_TYPE_NONE:
377 UMA_HISTOGRAM_ENUMERATION( 398 UMA_HISTOGRAM_ENUMERATION(
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn", 450 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn",
430 GetProfileType(profile_path), 451 GetProfileType(profile_path),
431 NUM_PROFILE_TYPE_METRICS); 452 NUM_PROFILE_TYPE_METRICS);
432 } 453 }
433 454
434 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) { 455 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) {
435 UMA_HISTOGRAM_ENUMERATION("Profile.Update", 456 UMA_HISTOGRAM_ENUMERATION("Profile.Update",
436 GetProfileType(profile_path), 457 GetProfileType(profile_path),
437 NUM_PROFILE_TYPE_METRICS); 458 NUM_PROFILE_TYPE_METRICS);
438 } 459 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_metrics.h ('k') | chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698