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

Side by Side Diff: chrome/browser/extensions/extension_metrics_module.cc

Issue 3207002: FBTF: Forward declare and move constructors in chrome/common/extensions/. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Win fixes Created 10 years, 4 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/extension_metrics_module.h" 5 #include "chrome/browser/extensions/extension_metrics_module.h"
6 6
7 #include "base/values.h"
7 #include "base/histogram.h" 8 #include "base/histogram.h"
8 #include "chrome/common/extensions/extension.h" 9 #include "chrome/common/extensions/extension.h"
9 #include "chrome/browser/metrics/user_metrics.h" 10 #include "chrome/browser/metrics/user_metrics.h"
10 11
11 namespace { 12 namespace {
12 13
13 // Build the full name of a metrics for the given extension. Each metric 14 // Build the full name of a metrics for the given extension. Each metric
14 // is made up of the unique name within the extension followed by the 15 // is made up of the unique name within the extension followed by the
15 // extension's id. This keeps the metrics from one extension unique from 16 // extension's id. This keeps the metrics from one extension unique from
16 // other extensions, as well as those metrics from chrome itself. 17 // other extensions, as well as those metrics from chrome itself.
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 return RecordValue(name, Histogram::HISTOGRAM, 1, kThreeMinMs, 50, sample); 138 return RecordValue(name, Histogram::HISTOGRAM, 1, kThreeMinMs, 50, sample);
138 } 139 }
139 140
140 bool MetricsRecordLongTimeFunction::RunImpl() { 141 bool MetricsRecordLongTimeFunction::RunImpl() {
141 std::string name; 142 std::string name;
142 int sample; 143 int sample;
143 EXTENSION_FUNCTION_VALIDATE(GetNameAndSample(&name, &sample)); 144 EXTENSION_FUNCTION_VALIDATE(GetNameAndSample(&name, &sample));
144 static const int kOneHourMs = 60 * 60 * 1000; 145 static const int kOneHourMs = 60 * 60 * 1000;
145 return RecordValue(name, Histogram::HISTOGRAM, 1, kOneHourMs, 50, sample); 146 return RecordValue(name, Histogram::HISTOGRAM, 1, kOneHourMs, 50, sample);
146 } 147 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698