Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(884)

Issue 2843383002: SerializeHostDescriptions ignores hosts with duplicated names (Closed)

Created:
3 years, 7 months ago by vabr (Chromium)
Modified:
3 years, 7 months ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/branch-heads/3071
Project:
chromium
Visibility:
Public.

Description

SerializeHostDescriptions 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -71 lines) Patch
M chrome/browser/devtools/serialize_host_descriptions.cc View 5 chunks +10 lines, -6 lines 0 comments Download
M chrome/browser/devtools/serialize_host_descriptions_unittest.cc View 3 chunks +87 lines, -65 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
vabr (Chromium)
3 years, 7 months ago (2017-04-27 08:34:11 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
6152aef1f655ee4ff82bd7cbc9210e1857855343.

Powered by Google App Engine
This is Rietveld 408576698