Skip to content

Commit fd7c998

Browse files
Thiabaud Engelbrechtchromeos-ci-prod
authored andcommitted
[field_trial] rename base::HashName to base::HashFieldTrialName
This was first added in https://chromium-review.googlesource.com/c/chromium/src/+/4695913. This CL updates the name to be less generic. Bug: None Change-Id: I3d1ba8b3fc42480e1571190967521a398168ba7e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4936030 Commit-Queue: Alexei Svitkine <[email protected]> Reviewed-by: Alexei Svitkine <[email protected]> Auto-Submit: Thiabaud Engelbrecht <[email protected]> Commit-Queue: Thiabaud Engelbrecht <[email protected]> Cr-Commit-Position: refs/heads/main@{#1208892} CrOS-Libchrome-Original-Commit: 9846f0e4ef9b597a65e9b4a9dbb42b69ec05821b
1 parent e28de7a commit fd7c998

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

base/metrics/field_trial_params.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void LogInvalidValue(const Feature& feature,
3131
const std::string& value_as_string,
3232
const std::string& default_value_as_string) {
3333
UmaHistogramSparse("Variations.FieldTriamParamsLogInvalidValue",
34-
static_cast<int>(base::HashName(
34+
static_cast<int>(base::HashFieldTrialName(
3535
FeatureList::GetFieldTrial(feature)->trial_name())));
3636
// To anyone noticing these crash dumps in the wild, these parameters come
3737
// from server-side experiment configuration. If you're seeing an increase it

base/metrics/metrics_hashes.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ uint32_t HashMetricNameAs32Bits(base::StringPiece name) {
5050
return DigestToUInt32(digest);
5151
}
5252

53-
uint32_t HashName(base::StringPiece name) {
53+
uint32_t HashFieldTrialName(base::StringPiece name) {
5454
// SHA-1 is designed to produce a uniformly random spread in its output space,
5555
// even for nearly-identical inputs.
5656
unsigned char sha1_hash[base::kSHA1Length];

base/metrics/metrics_hashes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ BASE_EXPORT uint32_t HashMetricNameAs32Bits(base::StringPiece name);
2222

2323
// Computes a uint32_t hash of a given string based on its SHA1 hash. Suitable
2424
// for uniquely identifying field trial names and group names.
25-
BASE_EXPORT uint32_t HashName(base::StringPiece name);
25+
BASE_EXPORT uint32_t HashFieldTrialName(base::StringPiece name);
2626

2727
} // namespace base
2828

0 commit comments

Comments
 (0)