blob: 149813f9f6adf31cbbf707efb7e6c2292cd047c0 [file] [log] [blame]
[email protected]bca34942012-09-05 18:23:251// 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
3// found in the LICENSE file.
4
Alexei Svitkine9de32cb2018-02-06 20:21:215#ifndef COMPONENTS_VARIATIONS_HASHING_H_
6#define COMPONENTS_VARIATIONS_HASHING_H_
[email protected]bca34942012-09-05 18:23:257
avi5dd91f82015-12-25 22:30:468#include <stdint.h>
9
thestig345fc9c52017-03-23 22:35:2410#include "base/strings/string_piece.h"
[email protected]bca34942012-09-05 18:23:2511
Alexei Svitkine9de32cb2018-02-06 20:21:2112namespace variations {
[email protected]bca34942012-09-05 18:23:2513
avi5dd91f82015-12-25 22:30:4614// Computes a uint32_t hash of a given string based on its SHA1 hash. Suitable
15// for uniquely identifying field trial names and group names.
thestig345fc9c52017-03-23 22:35:2416uint32_t HashName(base::StringPiece name);
[email protected]bca34942012-09-05 18:23:2517
Alexei Svitkine9de32cb2018-02-06 20:21:2118} // namespace variations
[email protected]bca34942012-09-05 18:23:2519
Alexei Svitkine9de32cb2018-02-06 20:21:2120#endif // COMPONENTS_VARIATIONS_HASHING_H_