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 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1047 // on recording, but not reporting, otherwise tests fail. | 1047 // on recording, but not reporting, otherwise tests fail. |
1048 metrics->StartRecordingOnly(); | 1048 metrics->StartRecordingOnly(); |
1049 return; | 1049 return; |
1050 } | 1050 } |
1051 | 1051 |
1052 if (IsMetricsReportingEnabled()) | 1052 if (IsMetricsReportingEnabled()) |
1053 metrics->Start(); | 1053 metrics->Start(); |
1054 } | 1054 } |
1055 | 1055 |
1056 bool ChromeBrowserMainParts::IsMetricsReportingEnabled() { | 1056 bool ChromeBrowserMainParts::IsMetricsReportingEnabled() { |
1057 return true; | |
Ilya Sherman
2012/02/17 06:07:44
TODO(isherman): This is handy for testing for now.
jar (doing other things)
2012/02/23 01:59:18
I had proposed putting in this exact code in a:
#i
Ilya Sherman
2012/02/24 02:10:06
Sounds fine to me, but probably best to do in a se
jar (doing other things)
2012/02/27 20:35:34
Since it would be a bad thing to check this in by
Ilya Sherman
2012/02/28 00:23:10
D'oh. Re-removed from this CL, and added the "#if
| |
1057 // If the user permits metrics reporting with the checkbox in the | 1058 // If the user permits metrics reporting with the checkbox in the |
1058 // prefs, we turn on recording. We disable metrics completely for | 1059 // prefs, we turn on recording. We disable metrics completely for |
1059 // non-official builds. | 1060 // non-official builds. |
1060 bool enabled = false; | 1061 bool enabled = false; |
1061 #if defined(GOOGLE_CHROME_BUILD) | 1062 #if defined(GOOGLE_CHROME_BUILD) |
1062 #if defined(OS_CHROMEOS) | 1063 #if defined(OS_CHROMEOS) |
1063 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref, | 1064 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref, |
1064 &enabled); | 1065 &enabled); |
1065 #else | 1066 #else |
1066 enabled = local_state_->GetBoolean(prefs::kMetricsReportingEnabled); | 1067 enabled = local_state_->GetBoolean(prefs::kMetricsReportingEnabled); |
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1958 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1959 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1959 uma_name += "_XP"; | 1960 uma_name += "_XP"; |
1960 | 1961 |
1961 uma_name += "_PreRead_"; | 1962 uma_name += "_PreRead_"; |
1962 uma_name += pre_read_percentage; | 1963 uma_name += pre_read_percentage; |
1963 AddPreReadHistogramTime(uma_name.c_str(), time); | 1964 AddPreReadHistogramTime(uma_name.c_str(), time); |
1964 } | 1965 } |
1965 #endif | 1966 #endif |
1966 #endif | 1967 #endif |
1967 } | 1968 } |
OLD | NEW |