| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/hash.h" | 5 #include "base/hash.h" |
| 6 #include "chrome_elf/dll_hash/dll_hash.h" | 6 #include "chrome_elf/dll_hash/dll_hash.h" |
| 7 | 7 |
| 8 int DllNameToHash(std::string dll_name) { | 8 int DllNameToHash(const std::string& dll_name) { |
| 9 uint32 data = base::Hash(dll_name); | 9 uint32 data = base::Hash(dll_name); |
| 10 | 10 |
| 11 // Strip off the signed bit because UMA doesn't support negative values, | 11 // Strip off the signed bit because UMA doesn't support negative values, |
| 12 // but takes a signed int as input. | 12 // but takes a signed int as input. |
| 13 return static_cast<int>(data & 0x7fffffff); | 13 return static_cast<int>(data & 0x7fffffff); |
| 14 } | 14 } |
| OLD | NEW |