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

Issue 2830093003: Replace uses of hash_map in //base (Closed)

Created:
3 years, 8 months ago by brettw
Modified:
3 years, 7 months ago
CC:
chromium-reviews, tracing+reviews_chromium.org, wfh+watch_chromium.org, danakj+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace uses of hash_map in //base base::hash_map is deprecated in favor of std::unordered_map (which it is a typedef of). The changes to tracing required updating of callers in third_party/WebKit. Some uses were replaced with more appropriate variants: std::map, base::flat_map, and base::small_map. A std::hash implementation of base::FilePath is added. BUG=576864 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2830093003 Cr-Commit-Position: refs/heads/master@{#467761} Committed: https://chromium.googlesource.com/chromium/src/+/1ce49f64ab5be7af3fa0a06d9bd1f826a13a0962

Patch Set 1 #

Patch Set 2 : WebKit callers #

Total comments: 17

Patch Set 3 : Review comments #

Patch Set 4 : Merge #

Patch Set 5 : Fixes #

Patch Set 6 : Some tests #

Patch Set 7 : iOS #

Unified diffs Side-by-side diffs Delta from patch set Stats (+163 lines, -132 lines) Patch
M base/containers/small_map_unittest.cc View 17 chunks +41 lines, -42 lines 0 comments Download
M base/files/file_path.h View 1 2 2 chunks +6 lines, -7 lines 0 comments Download
M base/files/file_path_watcher_linux.cc View 4 chunks +6 lines, -9 lines 0 comments Download
M base/id_map.h View 1 2 3 chunks +6 lines, -3 lines 0 comments Download
M base/id_map_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M base/memory/shared_memory.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M base/memory/shared_memory_tracker.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M base/path_service.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M base/stl_util.h View 1 chunk +1 line, -1 line 0 comments Download
M base/task/cancelable_task_tracker.h View 1 2 2 chunks +6 lines, -2 lines 0 comments Download
M base/task/cancelable_task_tracker.cc View 1 2 3 chunks +3 lines, -9 lines 0 comments Download
M base/trace_event/heap_profiler_allocation_context.h View 1 2 3 chunks +4 lines, -3 lines 0 comments Download
M base/trace_event/heap_profiler_allocation_context.cc View 1 2 chunks +4 lines, -2 lines 0 comments Download
M base/trace_event/heap_profiler_heap_dump_writer.h View 3 chunks +5 lines, -3 lines 0 comments Download
M base/trace_event/heap_profiler_heap_dump_writer.cc View 3 chunks +5 lines, -4 lines 0 comments Download
M base/trace_event/heap_profiler_heap_dump_writer_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M base/trace_event/malloc_dump_provider.cc View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M base/trace_event/process_memory_dump.h View 1 chunk +6 lines, -5 lines 0 comments Download
M base/trace_event/process_memory_dump.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M base/trace_event/process_memory_dump_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/trace_event/trace_event_memory_overhead.h View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M base/trace_event/trace_log.h View 2 chunks +6 lines, -6 lines 0 comments Download
M base/trace_event/trace_log.cc View 1 chunk +1 line, -2 lines 0 comments Download
M base/tracked_objects.h View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.cc View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M chromeos/system/statistics_provider.cc View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M components/dom_distiller/core/dom_distiller_store_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M components/leveldb_proto/testing/fake_db.h View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M components/safe_browsing_db/v4_get_hash_protocol_manager.h View 1 2 4 chunks +5 lines, -4 lines 0 comments Download
M components/safe_browsing_db/v4_protocol_manager_util.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M components/suggestions/image_manager_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M device/bluetooth/bluetooth_remote_gatt_service_win.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/service/gl_utils.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/ipc/host/shader_disk_cache.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ios/chrome/browser/ui/toolbar/web_toolbar_controller_unittest.mm View 1 2 3 4 5 6 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/instrumentation/tracing/web_process_memory_dump.h View 1 2 2 chunks +8 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/instrumentation/tracing/web_process_memory_dump.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 50 (30 generated)
brettw
eae: owners for WebKit/platform. These changes should be no-ops since base::hash_map is already a typedef ...
3 years, 8 months ago (2017-04-21 17:25:53 UTC) #5
Łukasz Anforowicz
On 2017/04/21 17:25:53, brettw (plz ping after 24h) wrote: > lukasza: everything else. I am ...
3 years, 8 months ago (2017-04-21 22:01:09 UTC) #10
Primiano Tucci (use gerrit)
If it can help base/Trace_event (and the memory stuff in blink, but I am not ...
3 years, 8 months ago (2017-04-21 22:03:41 UTC) #11
eae
LGTM for third_party/WebKit
3 years, 8 months ago (2017-04-21 23:51:26 UTC) #12
Łukasz Anforowicz
This CL looks mostly good to me, but I had some questions and comments below. ...
3 years, 8 months ago (2017-04-24 18:46:11 UTC) #13
brettw
New snap up with fixes, thanks. https://codereview.chromium.org/2830093003/diff/20001/base/files/file_path.h File base/files/file_path.h (right): https://codereview.chromium.org/2830093003/diff/20001/base/files/file_path.h#newcode476 base/files/file_path.h:476: // TODO(brettw) remove ...
3 years, 8 months ago (2017-04-25 23:32:36 UTC) #16
brettw
Merge
3 years, 8 months ago (2017-04-25 23:40:38 UTC) #21
Łukasz Anforowicz
lgtm - thanks! https://codereview.chromium.org/2830093003/diff/20001/base/id_map.h File base/id_map.h (right): https://codereview.chromium.org/2830093003/diff/20001/base/id_map.h#newcode43 base/id_map.h:43: using HashTable = std::unordered_map<KeyType, V>; On ...
3 years, 8 months ago (2017-04-25 23:49:01 UTC) #24
brettw
Fixes
3 years, 8 months ago (2017-04-26 18:21:05 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2830093003/80001
3 years, 8 months ago (2017-04-26 18:21:40 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-clang/builds/83983)
3 years, 8 months ago (2017-04-26 18:37:46 UTC) #32
brettw
Some tests
3 years, 8 months ago (2017-04-26 19:38:48 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2830093003/100001
3 years, 8 months ago (2017-04-26 19:39:31 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/202426)
3 years, 8 months ago (2017-04-26 20:04:07 UTC) #38
brettw
iOS
3 years, 8 months ago (2017-04-26 20:20:46 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2830093003/120001
3 years, 8 months ago (2017-04-26 20:21:52 UTC) #42
brettw
https://codereview.chromium.org/2830093003/diff/20001/base/id_map.h File base/id_map.h (right): https://codereview.chromium.org/2830093003/diff/20001/base/id_map.h#newcode43 base/id_map.h:43: using HashTable = std::unordered_map<KeyType, V>; IDMap is a template ...
3 years, 8 months ago (2017-04-26 20:51:58 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/439928)
3 years, 7 months ago (2017-04-26 23:30:43 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2830093003/120001
3 years, 7 months ago (2017-04-27 16:52:44 UTC) #47
commit-bot: I haz the power
3 years, 7 months ago (2017-04-27 19:42:46 UTC) #50
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/1ce49f64ab5be7af3fa0a06d9bd1...

Powered by Google App Engine
This is Rietveld 408576698