| 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/extensions/api/metrics_private/metrics_private_api.h" | 5 #include "chrome/browser/extensions/api/metrics_private/metrics_private_api.h" |
| 6 | 6 |
| 7 #include <limits.h> | 7 #include <limits.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| 11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 #include "base/metrics/field_trial.h" | 12 #include "base/metrics/field_trial.h" |
| 13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram_macros.h" |
| 14 #include "base/metrics/sparse_histogram.h" | 14 #include "base/metrics/sparse_histogram.h" |
| 15 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" | 15 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" |
| 16 #include "chrome/common/extensions/api/metrics_private.h" | 16 #include "chrome/common/extensions/api/metrics_private.h" |
| 17 #include "components/variations/variations_associated_data.h" | 17 #include "components/variations/variations_associated_data.h" |
| 18 #include "content/public/browser/user_metrics.h" | 18 #include "content/public/browser/user_metrics.h" |
| 19 #include "extensions/common/extension.h" | 19 #include "extensions/common/extension.h" |
| 20 | 20 |
| 21 namespace extensions { | 21 namespace extensions { |
| 22 | 22 |
| 23 namespace GetIsCrashReportingEnabled = | 23 namespace GetIsCrashReportingEnabled = |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 std::unique_ptr<RecordLongTime::Params> params( | 206 std::unique_ptr<RecordLongTime::Params> params( |
| 207 RecordLongTime::Params::Create(*args_)); | 207 RecordLongTime::Params::Create(*args_)); |
| 208 EXTENSION_FUNCTION_VALIDATE(params.get()); | 208 EXTENSION_FUNCTION_VALIDATE(params.get()); |
| 209 static const int kOneHourMs = 60 * 60 * 1000; | 209 static const int kOneHourMs = 60 * 60 * 1000; |
| 210 RecordValue(params->metric_name, base::HISTOGRAM, 1, kOneHourMs, 50, | 210 RecordValue(params->metric_name, base::HISTOGRAM, 1, kOneHourMs, 50, |
| 211 params->value); | 211 params->value); |
| 212 return RespondNow(NoArguments()); | 212 return RespondNow(NoArguments()); |
| 213 } | 213 } |
| 214 | 214 |
| 215 } // namespace extensions | 215 } // namespace extensions |
| OLD | NEW |