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

Unified Diff: components/sync/base/data_type_histogram_unittest.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/base/data_type_histogram.cc ('k') | components/sync/base/encryptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/base/data_type_histogram_unittest.cc
diff --git a/sync/util/data_type_histogram_unittest.cc b/components/sync/base/data_type_histogram_unittest.cc
similarity index 72%
rename from sync/util/data_type_histogram_unittest.cc
rename to components/sync/base/data_type_histogram_unittest.cc
index 7dc2bf23c0f58b123fdcfaf3d2aff5aa60c7ded2..0084ad40b0b559c513de1150d27c1a636e6c730f 100644
--- a/sync/util/data_type_histogram_unittest.cc
+++ b/components/sync/base/data_type_histogram_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "sync/util/data_type_histogram.h"
+#include "components/sync/base/data_type_histogram.h"
#include "base/metrics/statistics_recorder.h"
#include "base/time/time.h"
@@ -13,9 +13,7 @@ namespace {
class DataTypeHistogramTest : public testing::Test {
public:
- void SetUp() override {
- base::StatisticsRecorder::Initialize();
- }
+ void SetUp() override { base::StatisticsRecorder::Initialize(); }
};
// Create a histogram of type LOCAL_HISTOGRAM_COUNTS for each model type.
@@ -24,7 +22,7 @@ TEST(DataTypeHistogramTest, BasicCount) {
for (int i = FIRST_REAL_MODEL_TYPE; i <= LAST_REAL_MODEL_TYPE; ++i) {
ModelType type = ModelTypeFromInt(i);
#define PER_DATA_TYPE_MACRO(type_str) \
- LOCAL_HISTOGRAM_COUNTS("BasicCountPrefix" type_str "Suffix", 1);
+ LOCAL_HISTOGRAM_COUNTS("BasicCountPrefix" type_str "Suffix", 1);
SYNC_DATA_TYPE_HISTOGRAM(type);
#undef PER_DATA_TYPE_MACRO
}
@@ -35,9 +33,9 @@ TEST(DataTypeHistogramTest, BasicCount) {
TEST(DataTypeHistogramTest, BasicFreq) {
for (int i = FIRST_REAL_MODEL_TYPE; i <= LAST_REAL_MODEL_TYPE; ++i) {
ModelType type = ModelTypeFromInt(i);
-#define PER_DATA_TYPE_MACRO(type_str) \
- SYNC_FREQ_HISTOGRAM("BasicFreqPrefix" type_str "Suffix", \
- base::TimeDelta::FromSeconds(1));
+#define PER_DATA_TYPE_MACRO(type_str) \
+ SYNC_FREQ_HISTOGRAM("BasicFreqPrefix" type_str "Suffix", \
+ base::TimeDelta::FromSeconds(1));
SYNC_DATA_TYPE_HISTOGRAM(type);
#undef PER_DATA_TYPE_MACRO
}
@@ -53,9 +51,9 @@ TEST(DataTypeHistogramTest, BasicEnum) {
};
for (int i = FIRST_REAL_MODEL_TYPE; i <= LAST_REAL_MODEL_TYPE; ++i) {
ModelType type = ModelTypeFromInt(i);
-#define PER_DATA_TYPE_MACRO(type_str) \
- UMA_HISTOGRAM_ENUMERATION("BasicEnumPrefix" type_str "Suffix", \
- (i % 2 ? TYPE_1 : TYPE_2), TYPE_COUNT);
+#define PER_DATA_TYPE_MACRO(type_str) \
+ UMA_HISTOGRAM_ENUMERATION("BasicEnumPrefix" type_str "Suffix", \
+ (i % 2 ? TYPE_1 : TYPE_2), TYPE_COUNT);
SYNC_DATA_TYPE_HISTOGRAM(type);
#undef PER_DATA_TYPE_MACRO
}
« no previous file with comments | « components/sync/base/data_type_histogram.cc ('k') | components/sync/base/encryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698