Skip to content
  • vabr's avatar
    SerializeHostDescriptions ignores hosts with duplicated names · b95f5bc3
    vabr authored
    |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}
    b95f5bc3