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

Side by Side Diff: chrome/browser/extensions/api/metrics_private/metrics_private_api.cc

Issue 23097007: Create variations target that depends on base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 3 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/extensions/api/metrics_private/metrics_private_api.h" 5 #include "chrome/browser/extensions/api/metrics_private/metrics_private_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
11 #include "base/prefs/pref_service.h" 11 #include "base/prefs/pref_service.h"
12 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
13 #include "chrome/common/extensions/api/metrics_private.h" 13 #include "chrome/common/extensions/api/metrics_private.h"
14 #include "chrome/common/extensions/extension.h" 14 #include "chrome/common/extensions/extension.h"
15 #include "chrome/common/metrics/variations/variations_associated_data.h"
16 #include "chrome/common/pref_names.h" 15 #include "chrome/common/pref_names.h"
16 #include "components/variations/variations_associated_data.h"
17 #include "content/public/browser/user_metrics.h" 17 #include "content/public/browser/user_metrics.h"
18 18
19 #if defined(OS_CHROMEOS) 19 #if defined(OS_CHROMEOS)
20 #include "chrome/browser/chromeos/settings/cros_settings.h" 20 #include "chrome/browser/chromeos/settings/cros_settings.h"
21 #endif // OS_CHROMEOS 21 #endif // OS_CHROMEOS
22 22
23 namespace extensions { 23 namespace extensions {
24 24
25 namespace GetIsCrashReportingEnabled = 25 namespace GetIsCrashReportingEnabled =
26 api::metrics_private::GetIsCrashReportingEnabled; 26 api::metrics_private::GetIsCrashReportingEnabled;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 bool MetricsPrivateRecordLongTimeFunction::RunImpl() { 209 bool MetricsPrivateRecordLongTimeFunction::RunImpl() {
210 scoped_ptr<RecordLongTime::Params> params( 210 scoped_ptr<RecordLongTime::Params> params(
211 RecordLongTime::Params::Create(*args_)); 211 RecordLongTime::Params::Create(*args_));
212 EXTENSION_FUNCTION_VALIDATE(params.get()); 212 EXTENSION_FUNCTION_VALIDATE(params.get());
213 static const int kOneHourMs = 60 * 60 * 1000; 213 static const int kOneHourMs = 60 * 60 * 1000;
214 return RecordValue(params->metric_name, base::HISTOGRAM, 214 return RecordValue(params->metric_name, base::HISTOGRAM,
215 1, kOneHourMs, 50, params->value); 215 1, kOneHourMs, 50, params->value);
216 } 216 }
217 217
218 } // namespace extensions 218 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698