| OLD | NEW |
| 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/metrics/metrics_log.h" | 5 #include "chrome/browser/metrics/metrics_log.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 return *MetricsLog::uma_proto(); | 153 return *MetricsLog::uma_proto(); |
| 154 } | 154 } |
| 155 | 155 |
| 156 const metrics::SystemProfileProto& system_profile() const { | 156 const metrics::SystemProfileProto& system_profile() const { |
| 157 return uma_proto().system_profile(); | 157 return uma_proto().system_profile(); |
| 158 } | 158 } |
| 159 | 159 |
| 160 private: | 160 private: |
| 161 void InitPrefs() { | 161 void InitPrefs() { |
| 162 prefs_->SetInt64(prefs::kInstallDate, kInstallDate); | 162 prefs_->SetInt64(prefs::kInstallDate, kInstallDate); |
| 163 prefs_->SetString(prefs::kMetricsClientIDTimestamp, | 163 prefs_->SetString(prefs::kMetricsReportingEnabledTimestamp, |
| 164 base::Int64ToString(kEnabledDate)); | 164 base::Int64ToString(kEnabledDate)); |
| 165 #if defined(OS_CHROMEOS) | 165 #if defined(OS_CHROMEOS) |
| 166 prefs_->SetInteger(prefs::kStabilityChildProcessCrashCount, 10); | 166 prefs_->SetInteger(prefs::kStabilityChildProcessCrashCount, 10); |
| 167 prefs_->SetInteger(prefs::kStabilityOtherUserCrashCount, 11); | 167 prefs_->SetInteger(prefs::kStabilityOtherUserCrashCount, 11); |
| 168 prefs_->SetInteger(prefs::kStabilityKernelCrashCount, 12); | 168 prefs_->SetInteger(prefs::kStabilityKernelCrashCount, 12); |
| 169 prefs_->SetInteger(prefs::kStabilitySystemUncleanShutdownCount, 13); | 169 prefs_->SetInteger(prefs::kStabilitySystemUncleanShutdownCount, 13); |
| 170 #endif // OS_CHROMEOS | 170 #endif // OS_CHROMEOS |
| 171 } | 171 } |
| 172 | 172 |
| 173 virtual void GetFieldTrialIds( | 173 virtual void GetFieldTrialIds( |
| 174 std::vector<chrome_variations::ActiveGroupId>* field_trial_ids) const | 174 std::vector<chrome_variations::ActiveGroupId>* field_trial_ids) const |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 PairedDevice device2 = | 727 PairedDevice device2 = |
| 728 log.system_profile().hardware().bluetooth().paired_device(1); | 728 log.system_profile().hardware().bluetooth().paired_device(1); |
| 729 | 729 |
| 730 EXPECT_EQ(FakeBluetoothDeviceClient::kConfirmPasskeyClass, | 730 EXPECT_EQ(FakeBluetoothDeviceClient::kConfirmPasskeyClass, |
| 731 device2.bluetooth_class()); | 731 device2.bluetooth_class()); |
| 732 EXPECT_EQ(PairedDevice::DEVICE_PHONE, device2.type()); | 732 EXPECT_EQ(PairedDevice::DEVICE_PHONE, device2.type()); |
| 733 EXPECT_EQ(0x207D74U, device2.vendor_prefix()); | 733 EXPECT_EQ(0x207D74U, device2.vendor_prefix()); |
| 734 EXPECT_EQ(PairedDevice::VENDOR_ID_UNKNOWN, device2.vendor_id_source()); | 734 EXPECT_EQ(PairedDevice::VENDOR_ID_UNKNOWN, device2.vendor_id_source()); |
| 735 } | 735 } |
| 736 #endif // OS_CHROMEOS | 736 #endif // OS_CHROMEOS |
| OLD | NEW |