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

Issue 645513003: Use C++11 range-based loop in core/fetch (Closed)

Created:
6 years, 2 months ago by riju_
Modified:
6 years, 2 months ago
CC:
blink-reviews, gavinp+loader_chromium.org, Nate Chapin
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Use C++11 range-based loop in core/fetch Improves code readabilty BUG=none TEST=no layout test failures Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183923

Patch Set 1 #

Total comments: 8

Patch Set 2 : mike's comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -131 lines) Patch
M Source/core/fetch/FetchUtils.cpp View 2 chunks +4 lines, -6 lines 0 comments Download
M Source/core/fetch/ImageResource.cpp View 3 chunks +7 lines, -8 lines 1 comment Download
M Source/core/fetch/MemoryCache.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/fetch/MemoryCache.cpp View 1 2 chunks +4 lines, -8 lines 0 comments Download
M Source/core/fetch/RawResource.cpp View 2 chunks +7 lines, -12 lines 0 comments Download
M Source/core/fetch/Resource.cpp View 1 6 chunks +20 lines, -28 lines 0 comments Download
M Source/core/fetch/ResourceClientWalker.h View 1 chunk +2 lines, -4 lines 0 comments Download
M Source/core/fetch/ResourceFetcher.h View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/fetch/ResourceFetcher.cpp View 6 chunks +29 lines, -40 lines 0 comments Download
M Source/core/fetch/ResourceLoadPriorityOptimizer.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/fetch/ResourceLoadPriorityOptimizer.cpp View 1 2 chunks +8 lines, -10 lines 0 comments Download
M Source/core/fetch/ResourceLoaderSet.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/fetch/ResourceLoaderSet.cpp View 1 chunk +6 lines, -8 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
riju_
6 years, 2 months ago (2014-10-17 10:21:49 UTC) #2
Mike West
A few comments, thanks. https://codereview.chromium.org/645513003/diff/1/Source/core/fetch/MemoryCache.cpp File Source/core/fetch/MemoryCache.cpp (right): https://codereview.chromium.org/645513003/diff/1/Source/core/fetch/MemoryCache.cpp#newcode65 Source/core/fetch/MemoryCache.cpp:65: for (const auto& resource : ...
6 years, 2 months ago (2014-10-17 10:38:49 UTC) #3
riju_
https://codereview.chromium.org/645513003/diff/1/Source/core/fetch/MemoryCache.cpp File Source/core/fetch/MemoryCache.cpp (right): https://codereview.chromium.org/645513003/diff/1/Source/core/fetch/MemoryCache.cpp#newcode65 Source/core/fetch/MemoryCache.cpp:65: for (const auto& resource : memoryCache()->m_liveResources) { On 2014/10/17 ...
6 years, 2 months ago (2014-10-17 18:36:48 UTC) #4
Mike West
lgtm
6 years, 2 months ago (2014-10-17 18:53:20 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/645513003/20001
6 years, 2 months ago (2014-10-17 18:59:58 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001) as 183923
6 years, 2 months ago (2014-10-17 20:45:44 UTC) #8
kenneth.r.christiansen
https://codereview.chromium.org/645513003/diff/20001/Source/core/fetch/ImageResource.cpp File Source/core/fetch/ImageResource.cpp (right): https://codereview.chromium.org/645513003/diff/20001/Source/core/fetch/ImageResource.cpp#newcode390 Source/core/fetch/ImageResource.cpp:390: for (const auto& imageResource : images) { I am ...
6 years, 2 months ago (2014-10-18 09:55:04 UTC) #10
kenneth.r.christiansen
On 2014/10/18 at 09:55:04, kenneth.r.christiansen wrote: > https://codereview.chromium.org/645513003/diff/20001/Source/core/fetch/ImageResource.cpp > File Source/core/fetch/ImageResource.cpp (right): > > https://codereview.chromium.org/645513003/diff/20001/Source/core/fetch/ImageResource.cpp#newcode390 ...
6 years, 2 months ago (2014-10-18 10:04:50 UTC) #11
Mike West
6 years, 2 months ago (2014-10-18 11:45:36 UTC) #12
Message was sent while issue was closed.
On 2014/10/18 10:04:50, kenneth.r.christiansen wrote:
> On 2014/10/18 at 09:55:04, kenneth.r.christiansen wrote:
> >
>
https://codereview.chromium.org/645513003/diff/20001/Source/core/fetch/ImageR...
> > File Source/core/fetch/ImageResource.cpp (right):
> > 
> >
>
https://codereview.chromium.org/645513003/diff/20001/Source/core/fetch/ImageR...
> > Source/core/fetch/ImageResource.cpp:390: for (const auto& imageResource :
> images) {
> > I am not sure if calling this like imageResource is that nice as it is a
map,
> I personally went for entry. This applies to many of the places here.
> 
> Maybe calling is hashEntry or mapEntry or so would make the surrounding code
> more clear.

Happy to review a followup. :)

Powered by Google App Engine
This is Rietveld 408576698