OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 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 | |
5 #include "services/resource_coordinator/public/cpp/coordination_unit_id.h" | |
6 | |
7 #include "base/hash.h" | |
8 | |
9 namespace resource_coordinator { | |
10 | |
11 namespace {} // namespace | |
Primiano Tucci (use gerrit)
2017/04/06 18:09:47
I guess this is a leftover?
oystein (OOO til 10th of July)
2017/04/10 20:03:00
Yep; done.
| |
12 | |
13 CoordinationUnitID::CoordinationUnitID() = default; | |
Primiano Tucci (use gerrit)
2017/04/06 18:09:46
my ignorance: will the =Default ctor zero initiali
oystein (OOO til 10th of July)
2017/04/10 20:03:00
Nope; holdover from when id was an std::string.
| |
14 | |
15 CoordinationUnitID::CoordinationUnitID(const CoordinationUnitType& type, | |
16 const std::string& new_id) | |
17 : type(type) { | |
18 id = base::Hash(new_id); | |
Primiano Tucci (use gerrit)
2017/04/06 18:09:46
I got very bitten by base::Hash in the past with m
oystein (OOO til 10th of July)
2017/04/10 20:03:00
Ah good to know. I switched to Murmur2. skyostil@
| |
19 } | |
20 | |
21 } // resource_coordinator | |
OLD | NEW |