Chromium Code Reviews
DescriptionSerializeHostDescriptions ignores hosts with duplicated names
|HostDescriptionNode.name| identifies the node and should not be shared by two
different nodes. If multiple nodes are passed to SerializeHostDescriptions with
the same name, currently SerializeHostDescriptions ends up using
DictionaryValue after performing std::move on it, because of mixing nodes with
the same name.
This CL replaces some internal use of std::vector with std::unordered_set to
discard duplicities.
The CL also improves the unit test to be less dependent on the resulting order
of the serialized descriptions.
The CL also fixes the test name to match its filename and the name of the tested
function.
BUG=714368
Review-Url: https://codereview.chromium.org/2835823002
Cr-Commit-Position: refs/heads/master@{#466913}
(cherry picked from commit b95f5bc3e4433d6e28d44850506f47efcf8e4fff)
Review-Url: https://codereview.chromium.org/2843383002 .
Cr-Commit-Position: refs/branch-heads/3071@{#260}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}
Committed: https://chromium.googlesource.com/chromium/src/+/6152aef1f655ee4ff82bd7cbc9210e1857855343
Patch Set 1 #
Messages
Total messages: 2 (1 generated)
|
||||||||||||||||||||||||||||