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

Issue 1666843002: Refactor StringPiece hash. (Closed)

Created:
4 years, 10 months ago by Bence
Modified:
4 years, 10 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, plundblad+watch_chromium.org, toyoshim+midi_chromium.org, vmpstr+watch_chromium.org, aboxhall+watch_chromium.org, tfarina, nektar+watch_chromium.org, yuzo+watch_chromium.org, feature-media-reviews_chromium.org, je_julie, jshin+watch_chromium.org, dtseng+watch_chromium.org, dmazzoni+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor StringPiece hash. Rename struct BASE_HASH_NAMESPACE::hash<base::StringPiece> to struct base::StringPieceHash, and modify existing code as necessary. This is motivated by https://crrev.com/1660273002/#msg6. * Remove #include "base/containers/hash_tables.h" where not used any more. * Add this include for hash_map where necessary (string_piece.h does not include it any longer, so this might be necessary for the code to compile). * Change net::linked_hash_map from base::hash_map to std::unordered_map and add Hash template parameter. This way BASE_HASH_NAMESPACE::hash<Key> will not be implicitly used any more, so move QuicBlockedWriterInterfacePtrHash out of that namespace. BUG=576864 Committed: https://crrev.com/63c013002ffbbb4c7eac172097e16ea907403e08 Cr-Commit-Position: refs/heads/master@{#374005}

Patch Set 1 #

Patch Set 2 : Define hash on all compilers. #

Total comments: 5

Patch Set 3 : s/StringPieceHash16/StringPiece16Hash/ #

Patch Set 4 : Include hash_tables.h in components/mus/ws/ids.h to fix win8_chromium_ng compile error. #

Patch Set 5 : Sort includes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -56 lines) Patch
M base/strings/string_piece.h View 1 2 3 chunks +14 lines, -21 lines 0 comments Download
M components/mus/ws/ids.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M media/midi/midi_manager_alsa.h View 1 chunk +1 line, -0 lines 0 comments Download
M net/base/linked_hash_map.h View 2 chunks +3 lines, -3 lines 0 comments Download
M net/dns/dns_hosts.h View 1 chunk +1 line, -2 lines 0 comments Download
M net/http/http_server_properties_impl.h View 3 chunks +6 lines, -10 lines 0 comments Download
M net/quic/quic_blocked_writer_interface.h View 1 1 chunk +3 lines, -8 lines 0 comments Download
M net/spdy/hpack/hpack_header_table.h View 2 chunks +3 lines, -5 lines 0 comments Download
M net/spdy/hpack/hpack_header_table.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M net/spdy/spdy_header_block.h View 1 chunk +3 lines, -1 line 0 comments Download
M net/tools/quic/quic_dispatcher.h View 1 chunk +4 lines, -1 line 0 comments Download
M net/tools/quic/spdy_balsa_utils.cc View 2 chunks +2 lines, -1 line 0 comments Download
M tools/gn/scope.h View 2 chunks +4 lines, -2 lines 0 comments Download
M ui/accessibility/ax_tree_update.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 30 (15 generated)
Bence
danakj: PTAL at base/ yukawa: PTAL at media/midi/ davidben: PTAL at net/ brettw: PTAL at ...
4 years, 10 months ago (2016-02-04 16:32:00 UTC) #3
dmazzoni
lgtm for ui/accessibility
4 years, 10 months ago (2016-02-04 16:42:14 UTC) #5
yukawa
media/midi/midi_manager_alsa.h: lgtm
4 years, 10 months ago (2016-02-04 17:37:16 UTC) #8
davidben
net lgtm, modulo the couple of QUIC files which rch should look at. Thanks for ...
4 years, 10 months ago (2016-02-04 19:45:10 UTC) #11
danakj
base LGTM but pls fix the name https://codereview.chromium.org/1666843002/diff/40001/base/strings/string_piece.h File base/strings/string_piece.h (right): https://codereview.chromium.org/1666843002/diff/40001/base/strings/string_piece.h#newcode454 base/strings/string_piece.h:454: struct StringPieceHash16 ...
4 years, 10 months ago (2016-02-04 19:45:52 UTC) #12
Ryan Hamilton
LGTM https://codereview.chromium.org/1666843002/diff/40001/net/quic/quic_blocked_writer_interface.h File net/quic/quic_blocked_writer_interface.h (left): https://codereview.chromium.org/1666843002/diff/40001/net/quic/quic_blocked_writer_interface.h#oldcode29 net/quic/quic_blocked_writer_interface.h:29: #if defined(COMPILER_GCC) On 2016/02/04 19:45:09, davidben (catching up) ...
4 years, 10 months ago (2016-02-04 20:15:14 UTC) #13
brettw
lgtm
4 years, 10 months ago (2016-02-04 20:26:54 UTC) #14
Bence
Thank you all for the quick review. https://codereview.chromium.org/1666843002/diff/40001/base/strings/string_piece.h File base/strings/string_piece.h (right): https://codereview.chromium.org/1666843002/diff/40001/base/strings/string_piece.h#newcode454 base/strings/string_piece.h:454: struct StringPieceHash16 ...
4 years, 10 months ago (2016-02-04 20:28:20 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1666843002/50001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1666843002/50001
4 years, 10 months ago (2016-02-04 20:30:30 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/builds/99168)
4 years, 10 months ago (2016-02-04 23:12:53 UTC) #20
Bence
Elliot: PTAL at components/mus/. Thank you.
4 years, 10 months ago (2016-02-05 16:15:24 UTC) #22
Elliot Glaysher
lgtm
4 years, 10 months ago (2016-02-05 18:27:03 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1666843002/90001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1666843002/90001
4 years, 10 months ago (2016-02-06 03:53:46 UTC) #26
commit-bot: I haz the power
Committed patchset #5 (id:90001)
4 years, 10 months ago (2016-02-06 03:58:26 UTC) #28
commit-bot: I haz the power
4 years, 10 months ago (2016-02-06 03:59:47 UTC) #30
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/63c013002ffbbb4c7eac172097e16ea907403e08
Cr-Commit-Position: refs/heads/master@{#374005}

Powered by Google App Engine
This is Rietveld 408576698