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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 #include "chrome/common/chrome_switches.h" 99 #include "chrome/common/chrome_switches.h"
100 #include "chrome/common/crash_keys.h" 100 #include "chrome/common/crash_keys.h"
101 #include "chrome/common/env_vars.h" 101 #include "chrome/common/env_vars.h"
102 #include "chrome/common/logging_chrome.h" 102 #include "chrome/common/logging_chrome.h"
103 #include "chrome/common/net/net_resource_provider.h" 103 #include "chrome/common/net/net_resource_provider.h"
104 #include "chrome/common/pref_names.h" 104 #include "chrome/common/pref_names.h"
105 #include "chrome/common/profiling.h" 105 #include "chrome/common/profiling.h"
106 #include "chrome/installer/util/google_update_settings.h" 106 #include "chrome/installer/util/google_update_settings.h"
107 #include "components/google/core/browser/google_util.h" 107 #include "components/google/core/browser/google_util.h"
108 #include "components/language_usage_metrics/language_usage_metrics.h" 108 #include "components/language_usage_metrics/language_usage_metrics.h"
109 #include "components/metrics/metrics_pref_names.h"
109 #include "components/metrics/metrics_service.h" 110 #include "components/metrics/metrics_service.h"
110 #include "components/nacl/browser/nacl_browser.h" 111 #include "components/nacl/browser/nacl_browser.h"
111 #include "components/nacl/browser/nacl_process_host.h" 112 #include "components/nacl/browser/nacl_process_host.h"
112 #include "components/rappor/rappor_service.h" 113 #include "components/rappor/rappor_service.h"
113 #include "components/signin/core/common/profile_management_switches.h" 114 #include "components/signin/core/common/profile_management_switches.h"
114 #include "components/startup_metric_utils/startup_metric_utils.h" 115 #include "components/startup_metric_utils/startup_metric_utils.h"
115 #include "components/translate/core/browser/translate_download_manager.h" 116 #include "components/translate/core/browser/translate_download_manager.h"
116 #include "content/public/browser/browser_thread.h" 117 #include "content/public/browser/browser_thread.h"
117 #include "content/public/browser/notification_observer.h" 118 #include "content/public/browser/notification_observer.h"
118 #include "content/public/browser/notification_registrar.h" 119 #include "content/public/browser/notification_registrar.h"
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 base::debug::SetCrashKeyValue(crash_keys::kChannel, 931 base::debug::SetCrashKeyValue(crash_keys::kChannel,
931 chrome::VersionInfo::GetVersionStringModifier()); 932 chrome::VersionInfo::GetVersionStringModifier());
932 #endif 933 #endif
933 934
934 // Initialize tracking synchronizer system. 935 // Initialize tracking synchronizer system.
935 tracking_synchronizer_ = new chrome_browser_metrics::TrackingSynchronizer(); 936 tracking_synchronizer_ = new chrome_browser_metrics::TrackingSynchronizer();
936 937
937 // Now that all preferences have been registered, set the install date 938 // Now that all preferences have been registered, set the install date
938 // for the uninstall metrics if this is our first run. This only actually 939 // for the uninstall metrics if this is our first run. This only actually
939 // gets used if the user has metrics reporting enabled at uninstall time. 940 // gets used if the user has metrics reporting enabled at uninstall time.
940 int64 install_date = local_state_->GetInt64(prefs::kInstallDate); 941 int64 install_date = local_state_->GetInt64(metrics::prefs::kInstallDate);
941 if (install_date == 0) 942 if (install_date == 0) {
942 local_state_->SetInt64(prefs::kInstallDate, base::Time::Now().ToTimeT()); 943 local_state_->SetInt64(metrics::prefs::kInstallDate,
944 base::Time::Now().ToTimeT());
945 }
943 946
944 #if defined(OS_MACOSX) 947 #if defined(OS_MACOSX)
945 // Get the Keychain API to register for distributed notifications on the main 948 // Get the Keychain API to register for distributed notifications on the main
946 // thread, which has a proper CFRunloop, instead of later on the I/O thread, 949 // thread, which has a proper CFRunloop, instead of later on the I/O thread,
947 // which doesn't. This ensures those notifications will get delivered 950 // which doesn't. This ensures those notifications will get delivered
948 // properly. See issue 37766. 951 // properly. See issue 37766.
949 // (Note that the callback mask here is empty. I don't want to register for 952 // (Note that the callback mask here is empty. I don't want to register for
950 // any callbacks, I just want to initialize the mechanism.) 953 // any callbacks, I just want to initialize the mechanism.)
951 SecKeychainAddCallback(&KeychainCallback, 0, NULL); 954 SecKeychainAddCallback(&KeychainCallback, 0, NULL);
952 #endif 955 #endif
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 chromeos::CrosSettings::Shutdown(); 1657 chromeos::CrosSettings::Shutdown();
1655 #endif 1658 #endif
1656 #endif 1659 #endif
1657 } 1660 }
1658 1661
1659 // Public members: 1662 // Public members:
1660 1663
1661 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1664 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1662 chrome_extra_parts_.push_back(parts); 1665 chrome_extra_parts_.push_back(parts);
1663 } 1666 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698