summaryrefslogtreecommitdiffstats
path: root/sync/util
diff options
context:
space:
mode:
authorasvitkine <asvitkine@chromium.org>2014-08-25 21:39:35 -0700
committerCommit bot <commit-bot@chromium.org>2014-08-26 04:41:10 +0000
commitc0fb802166c8389285c8a850bd47d2d96935f6f1 (patch)
treeba22f56fcdd9a93ba6eca61d754593b327b8629a /sync/util
parent663b9f47b6611de54f4e358d50baf7e91717c41c (diff)
downloadchromium_src-c0fb802166c8389285c8a850bd47d2d96935f6f1.zip
chromium_src-c0fb802166c8389285c8a850bd47d2d96935f6f1.tar.gz
chromium_src-c0fb802166c8389285c8a850bd47d2d96935f6f1.tar.bz2
Add LOCAL_ prefix to non-UMA histogram macros.
This makes it harder to accidently use the wrong macro. Also, removes the D* variants of the macros and associated DebugNow() function. These were rarely used and removing them removes clutter from the header file. Existing uses converted to be behind NDEBUG ifdefs. No functional changes except for a fix to the code in content_based_thumbnailing_algorithm.cc which was incorrectly using a ternary operator for the histogram name (which doesn't work since the macros cache the histogram object) and removal of local histograms Spellcheck.SuggestTime and Spellcheck.InitTime per groby@. Since this is an API rename, TBR'ing downstream owners. BUG=311349 TBR=groby@chromium.org,zea@chromium.org,jeremy@chromium.org,reveman@chromium.org,agl@chromium.org,jam@chromium.org Review URL: https://codereview.chromium.org/484603006 Cr-Commit-Position: refs/heads/master@{#291840}
Diffstat (limited to 'sync/util')
-rw-r--r--sync/util/data_type_histogram_unittest.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sync/util/data_type_histogram_unittest.cc b/sync/util/data_type_histogram_unittest.cc
index 67b5e64..df65735 100644
--- a/sync/util/data_type_histogram_unittest.cc
+++ b/sync/util/data_type_histogram_unittest.cc
@@ -13,13 +13,13 @@ namespace {
class DataTypeHistogramTest : public testing::Test {
};
-// Create a histogram of type HISTOGRAM_COUNTS for each model type. Nothing
-// should break.
+// Create a histogram of type LOCAL_HISTOGRAM_COUNTS for each model type.
+// Nothing should break.
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) \
- HISTOGRAM_COUNTS("Prefix" type_str "Suffix", 1);
+ LOCAL_HISTOGRAM_COUNTS("Prefix" type_str "Suffix", 1);
SYNC_DATA_TYPE_HISTOGRAM(type);
#undef PER_DATA_TYPE_MACRO
}