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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 // on recording, but not reporting, otherwise tests fail. | 1048 // on recording, but not reporting, otherwise tests fail. |
1049 metrics->StartRecordingOnly(); | 1049 metrics->StartRecordingOnly(); |
1050 return; | 1050 return; |
1051 } | 1051 } |
1052 | 1052 |
1053 if (IsMetricsReportingEnabled()) | 1053 if (IsMetricsReportingEnabled()) |
1054 metrics->Start(); | 1054 metrics->Start(); |
1055 } | 1055 } |
1056 | 1056 |
1057 bool ChromeBrowserMainParts::IsMetricsReportingEnabled() { | 1057 bool ChromeBrowserMainParts::IsMetricsReportingEnabled() { |
| 1058 return true; |
1058 // If the user permits metrics reporting with the checkbox in the | 1059 // If the user permits metrics reporting with the checkbox in the |
1059 // prefs, we turn on recording. We disable metrics completely for | 1060 // prefs, we turn on recording. We disable metrics completely for |
1060 // non-official builds. | 1061 // non-official builds. |
1061 bool enabled = false; | 1062 bool enabled = false; |
1062 #if defined(GOOGLE_CHROME_BUILD) | 1063 #if defined(GOOGLE_CHROME_BUILD) |
1063 #if defined(OS_CHROMEOS) | 1064 #if defined(OS_CHROMEOS) |
1064 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref, | 1065 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref, |
1065 &enabled); | 1066 &enabled); |
1066 #else | 1067 #else |
1067 enabled = local_state_->GetBoolean(prefs::kMetricsReportingEnabled); | 1068 enabled = local_state_->GetBoolean(prefs::kMetricsReportingEnabled); |
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1959 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1960 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1960 uma_name += "_XP"; | 1961 uma_name += "_XP"; |
1961 | 1962 |
1962 uma_name += "_PreRead_"; | 1963 uma_name += "_PreRead_"; |
1963 uma_name += pre_read_percentage; | 1964 uma_name += pre_read_percentage; |
1964 AddPreReadHistogramTime(uma_name.c_str(), time); | 1965 AddPreReadHistogramTime(uma_name.c_str(), time); |
1965 } | 1966 } |
1966 #endif | 1967 #endif |
1967 #endif | 1968 #endif |
1968 } | 1969 } |
OLD | NEW |