[email protected] | bca3494 | 2012-09-05 18:23:25 | [diff] [blame] | 1 | // 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 Svitkine | 9de32cb | 2018-02-06 20:21:21 | [diff] [blame] | 5 | #ifndef COMPONENTS_VARIATIONS_HASHING_H_ |
6 | #define COMPONENTS_VARIATIONS_HASHING_H_ | ||||
[email protected] | bca3494 | 2012-09-05 18:23:25 | [diff] [blame] | 7 | |
avi | 5dd91f8 | 2015-12-25 22:30:46 | [diff] [blame] | 8 | #include <stdint.h> |
9 | |||||
thestig | 345fc9c5 | 2017-03-23 22:35:24 | [diff] [blame] | 10 | #include "base/strings/string_piece.h" |
[email protected] | bca3494 | 2012-09-05 18:23:25 | [diff] [blame] | 11 | |
Alexei Svitkine | 9de32cb | 2018-02-06 20:21:21 | [diff] [blame] | 12 | namespace variations { |
[email protected] | bca3494 | 2012-09-05 18:23:25 | [diff] [blame] | 13 | |
avi | 5dd91f8 | 2015-12-25 22:30:46 | [diff] [blame] | 14 | // 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. | ||||
thestig | 345fc9c5 | 2017-03-23 22:35:24 | [diff] [blame] | 16 | uint32_t HashName(base::StringPiece name); |
[email protected] | bca3494 | 2012-09-05 18:23:25 | [diff] [blame] | 17 | |
Alexei Svitkine | 9de32cb | 2018-02-06 20:21:21 | [diff] [blame] | 18 | } // namespace variations |
[email protected] | bca3494 | 2012-09-05 18:23:25 | [diff] [blame] | 19 | |
Alexei Svitkine | 9de32cb | 2018-02-06 20:21:21 | [diff] [blame] | 20 | #endif // COMPONENTS_VARIATIONS_HASHING_H_ |