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

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

Issue 2771233002: Remove the wrapper functions content::RecordAction et al (Closed)
Patch Set: Rebased Created 3 years, 8 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
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/browser/profiles/profile_window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <vector> 7 #include <vector>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/metrics/histogram_macros.h" 11 #include "base/metrics/histogram_macros.h"
12 #include "base/metrics/user_metrics.h"
12 #include "build/build_config.h" 13 #include "build/build_config.h"
13 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
14 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/profiles/profile_attributes_entry.h" 16 #include "chrome/browser/profiles/profile_attributes_entry.h"
16 #include "chrome/browser/profiles/profile_attributes_storage.h" 17 #include "chrome/browser/profiles/profile_attributes_storage.h"
17 #include "chrome/browser/profiles/profile_manager.h" 18 #include "chrome/browser/profiles/profile_manager.h"
18 #include "chrome/browser/signin/chrome_signin_helper.h" 19 #include "chrome/browser/signin/chrome_signin_helper.h"
19 #include "chrome/browser/ui/browser_finder.h" 20 #include "chrome/browser/ui/browser_finder.h"
20 #include "chrome/common/chrome_constants.h" 21 #include "chrome/common/chrome_constants.h"
21 #include "chrome/installer/util/google_update_settings.h" 22 #include "chrome/installer/util/google_update_settings.h"
22 #include "components/profile_metrics/counts.h" 23 #include "components/profile_metrics/counts.h"
23 #include "content/public/browser/browser_thread.h" 24 #include "content/public/browser/browser_thread.h"
24 #include "content/public/browser/user_metrics.h"
25 25
26 namespace { 26 namespace {
27 27
28 #if defined(OS_WIN) || defined(OS_MACOSX) 28 #if defined(OS_WIN) || defined(OS_MACOSX)
29 const int kMaximumReportedProfileCount = 5; 29 const int kMaximumReportedProfileCount = 5;
30 #endif 30 #endif
31 31
32 const int kMaximumDaysOfDisuse = 4 * 7; // Should be integral number of weeks. 32 const int kMaximumDaysOfDisuse = 4 * 7; // Should be integral number of weeks.
33 33
34 #if !defined(OS_ANDROID) 34 #if !defined(OS_ANDROID)
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 } 529 }
530 #endif // defined(OS_ANDROID) 530 #endif // defined(OS_ANDROID)
531 531
532 void ProfileMetrics::LogProfileLaunch(Profile* profile) { 532 void ProfileMetrics::LogProfileLaunch(Profile* profile) {
533 base::FilePath profile_path = profile->GetPath(); 533 base::FilePath profile_path = profile->GetPath();
534 UMA_HISTOGRAM_ENUMERATION("Profile.LaunchBrowser", 534 UMA_HISTOGRAM_ENUMERATION("Profile.LaunchBrowser",
535 GetProfileType(profile_path), 535 GetProfileType(profile_path),
536 NUM_PROFILE_TYPE_METRICS); 536 NUM_PROFILE_TYPE_METRICS);
537 537
538 if (profile->IsSupervised()) { 538 if (profile->IsSupervised()) {
539 content::RecordAction( 539 base::RecordAction(
540 base::UserMetricsAction("ManagedMode_NewManagedUserWindow")); 540 base::UserMetricsAction("ManagedMode_NewManagedUserWindow"));
541 } 541 }
542 } 542 }
543 543
544 void ProfileMetrics::LogProfileSyncSignIn(const base::FilePath& profile_path) { 544 void ProfileMetrics::LogProfileSyncSignIn(const base::FilePath& profile_path) {
545 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn", 545 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn",
546 GetProfileType(profile_path), 546 GetProfileType(profile_path),
547 NUM_PROFILE_TYPE_METRICS); 547 NUM_PROFILE_TYPE_METRICS);
548 } 548 }
549 549
550 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) { 550 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) {
551 UMA_HISTOGRAM_ENUMERATION("Profile.Update", 551 UMA_HISTOGRAM_ENUMERATION("Profile.Update",
552 GetProfileType(profile_path), 552 GetProfileType(profile_path),
553 NUM_PROFILE_TYPE_METRICS); 553 NUM_PROFILE_TYPE_METRICS);
554 } 554 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/browser/profiles/profile_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698