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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 370813003: Move kInstallDate from chrome/common/pref_names.h to components/metrics/metrics_pref_names.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review:isherman Created 6 years, 5 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
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index f8f8b998e2176b5015e844f716d89357aa5a54bd..7fa0378a9881449b9dd305f52fb1a6e33beb6aa3 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -105,6 +105,7 @@
#include "chrome/installer/util/google_update_settings.h"
#include "components/google/core/browser/google_util.h"
#include "components/language_usage_metrics/language_usage_metrics.h"
+#include "components/metrics/metrics_pref_names.h"
#include "components/metrics/metrics_service.h"
#include "components/nacl/browser/nacl_browser.h"
#include "components/nacl/browser/nacl_process_host.h"
@@ -939,9 +940,11 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
// Now that all preferences have been registered, set the install date
// for the uninstall metrics if this is our first run. This only actually
// gets used if the user has metrics reporting enabled at uninstall time.
- int64 install_date = local_state_->GetInt64(prefs::kInstallDate);
- if (install_date == 0)
- local_state_->SetInt64(prefs::kInstallDate, base::Time::Now().ToTimeT());
+ int64 install_date = local_state_->GetInt64(metrics::prefs::kInstallDate);
+ if (install_date == 0) {
+ local_state_->SetInt64(metrics::prefs::kInstallDate,
+ base::Time::Now().ToTimeT());
Alexei Svitkine (slow) 2014/07/14 17:00:53 I don't like the fact that we're recording install
gab 2014/07/14 19:38:13 SGTM, in fact how about we just do this automatica
Alexei Svitkine (slow) 2014/07/14 19:40:38 That sounds even better assuming it's safe to do (
gab 2014/07/14 19:52:37 Well that's the same (slightly earlier in fact) as
Alexei Svitkine (slow) 2014/07/15 15:49:33 I was originally suggesting it to be a static meth
gab 2014/07/15 22:13:15 Follow-up CL posted @ https://codereview.chromium.
+ }
#if defined(OS_MACOSX)
// Get the Keychain API to register for distributed notifications on the main
« no previous file with comments | « chrome/browser/chrome_browser_field_trials.cc ('k') | chrome/browser/metrics/chrome_metrics_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698