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

Issue 853533002: Use proper pair type in range-based for map iterations. (Closed)

Created:
5 years, 11 months ago by vmpstr
Modified:
5 years, 11 months ago
CC:
browser-components-watch_chromium.org, cbentzel+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org, pam+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use proper pair type in range-based for map iterations. Since map<Key, Value>::value_type is std::pair<const Key, Value>, we need to ensure that we use this type to avoid an extra copy/temporary creation. This patch does this by explicitly using value_type where it is clear what the type is, and adding const to the key where it's not. Committed: https://crrev.com/49418e62a7ea52dfa99b3316b0e7b5cf79f98844 Cr-Commit-Position: refs/heads/master@{#311524}

Patch Set 1 #

Total comments: 2

Patch Set 2 : supervised_user auto #

Total comments: 2

Patch Set 3 : more auto #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
M chrome/browser/history/expire_history_backend_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/supervised_user/supervised_user_url_filter.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M extensions/browser/api/hid/hid_device_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/quic/quic_stream_factory.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 18 (5 generated)
vmpstr
Please take a look. +rdsmith for net/quic +sdefresne for chrome/browser/history +bauerb for chrome/browser/supervised_user +yoz for ...
5 years, 11 months ago (2015-01-13 19:48:08 UTC) #2
Randy Smith (Not in Mondays)
net/quic -> rch.
5 years, 11 months ago (2015-01-13 19:54:54 UTC) #4
Ryan Hamilton
net/quic: LGTM
5 years, 11 months ago (2015-01-13 19:57:42 UTC) #5
Yoyo Zhou
api/hid -> reillyg I'd be ok with auto, but Reilly is a more specific owner.
5 years, 11 months ago (2015-01-13 20:48:34 UTC) #7
Reilly Grant (use Gerrit)
hid_device_manager lgtm I'm fine with whatever as long as it fits on one line. On ...
5 years, 11 months ago (2015-01-13 21:11:12 UTC) #8
Bernhard Bauer
https://codereview.chromium.org/853533002/diff/1/chrome/browser/supervised_user/supervised_user_url_filter.cc File chrome/browser/supervised_user/supervised_user_url_filter.cc (right): https://codereview.chromium.org/853533002/diff/1/chrome/browser/supervised_user/supervised_user_url_filter.cc#newcode318 chrome/browser/supervised_user/supervised_user_url_filter.cc:318: for (const std::map<std::string, bool>::value_type& host_entry : host_map_) { I ...
5 years, 11 months ago (2015-01-13 23:16:40 UTC) #9
vmpstr
https://codereview.chromium.org/853533002/diff/1/chrome/browser/supervised_user/supervised_user_url_filter.cc File chrome/browser/supervised_user/supervised_user_url_filter.cc (right): https://codereview.chromium.org/853533002/diff/1/chrome/browser/supervised_user/supervised_user_url_filter.cc#newcode318 chrome/browser/supervised_user/supervised_user_url_filter.cc:318: for (const std::map<std::string, bool>::value_type& host_entry : host_map_) { On ...
5 years, 11 months ago (2015-01-13 23:37:07 UTC) #10
vmpstr
+sky for chrome/browser/history/expire_history_backend_unittest.cc. Please take a look.
5 years, 11 months ago (2015-01-14 02:26:31 UTC) #12
sdefresne
lgtm https://codereview.chromium.org/853533002/diff/20001/chrome/browser/history/expire_history_backend_unittest.cc File chrome/browser/history/expire_history_backend_unittest.cc (right): https://codereview.chromium.org/853533002/diff/20001/chrome/browser/history/expire_history_backend_unittest.cc#newcode336 chrome/browser/history/expire_history_backend_unittest.cc:336: for (const URLsDeletedNotificationList::value_type& pair : nit: I slightly ...
5 years, 11 months ago (2015-01-14 10:47:08 UTC) #13
vmpstr
https://codereview.chromium.org/853533002/diff/20001/chrome/browser/history/expire_history_backend_unittest.cc File chrome/browser/history/expire_history_backend_unittest.cc (right): https://codereview.chromium.org/853533002/diff/20001/chrome/browser/history/expire_history_backend_unittest.cc#newcode336 chrome/browser/history/expire_history_backend_unittest.cc:336: for (const URLsDeletedNotificationList::value_type& pair : On 2015/01/14 10:47:08, sdefresne ...
5 years, 11 months ago (2015-01-14 17:32:16 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/853533002/40001
5 years, 11 months ago (2015-01-14 17:32:33 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 11 months ago (2015-01-14 19:08:04 UTC) #17
commit-bot: I haz the power
5 years, 11 months ago (2015-01-14 19:09:29 UTC) #18
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/49418e62a7ea52dfa99b3316b0e7b5cf79f98844
Cr-Commit-Position: refs/heads/master@{#311524}

Powered by Google App Engine
This is Rietveld 408576698