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

Issue 2120233003: [OBSOLETE] Remove WebURLResponse::initialize() (Closed)

Created:
4 years, 5 months ago by Adam Rice
Modified:
4 years, 5 months ago
Reviewers:
kinuko
CC:
chromium-reviews, tyoshino+watch_chromium.org, jam, loading-reviews_chromium.org, dglazkov+blink, darin-cc_chromium.org, gavinp+loader_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, kinuko+watch, Nate Chapin, blink-reviews-api_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[OBSOLETE] Remove WebURLResponse::initialize() The implementation of WebURLResponse::initialize() was trivial and could easily be moved to the constructor. Remove it. Also remove the public assign() method and the reset() method. BUG=625529

Patch Set 1 #

Patch Set 2 : Improve WrappedResourceResponse construction performance #

Patch Set 3 : Fix formatting issues and one last compile error #

Total comments: 2

Patch Set 4 : Remove non-const WrappedResourceResponse::bind() #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -86 lines) Patch
M content/child/web_url_loader_impl.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M content/child/web_url_loader_impl_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/render_view_browsertest.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M media/blink/cache_util_unittest.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/MultipartImageResourceParserTest.cpp View 3 chunks +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceLoader.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp View 2 chunks +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/exported/WebURLResponse.cpp View 1 2 5 chunks +34 lines, -17 lines 2 comments Download
M third_party/WebKit/Source/platform/exported/WrappedResourceResponse.h View 1 2 3 1 chunk +14 lines, -16 lines 5 comments Download
M third_party/WebKit/Source/platform/testing/URLTestHelpers.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp View 16 chunks +0 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/web/WebEmbeddedWorkerImplTest.cpp View 2 chunks +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/FrameSerializerTest.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 3 chunks +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebURLResponseTest.cpp View 3 chunks +15 lines, -1 line 0 comments Download
M third_party/WebKit/public/platform/WebURLResponse.h View 1 3 chunks +12 lines, -17 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
Adam Rice
4 years, 5 months ago (2016-07-04 10:18:43 UTC) #2
kinuko
Sorry for slow review, this code looks generally good but it sticks me that the ...
4 years, 5 months ago (2016-07-05 09:29:09 UTC) #3
Adam Rice
One possibility I considered is to make WebURLResponse a base class with undefined ownership semantics ...
4 years, 5 months ago (2016-07-05 10:02:42 UTC) #4
kinuko
Some more comments. https://codereview.chromium.org/2120233003/diff/60001/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp File third_party/WebKit/Source/platform/exported/WebURLResponse.cpp (right): https://codereview.chromium.org/2120233003/diff/60001/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp#newcode353 third_party/WebKit/Source/platform/exported/WebURLResponse.cpp:353: DCHECK(m_private); This DCHECK seems redundant now ...
4 years, 5 months ago (2016-07-05 14:59:44 UTC) #5
kinuko
https://codereview.chromium.org/2120233003/diff/60001/third_party/WebKit/Source/platform/exported/WrappedResourceResponse.h File third_party/WebKit/Source/platform/exported/WrappedResourceResponse.h (right): https://codereview.chromium.org/2120233003/diff/60001/third_party/WebKit/Source/platform/exported/WrappedResourceResponse.h#newcode72 third_party/WebKit/Source/platform/exported/WrappedResourceResponse.h:72: void dispose() override { m_resourceResponse = 0; } I ...
4 years, 5 months ago (2016-07-05 15:42:11 UTC) #6
kinuko
I've tried revising the patch to see how it'd look if we address comments I ...
4 years, 5 months ago (2016-07-05 15:53:14 UTC) #7
Adam Rice
4 years, 5 months ago (2016-07-06 01:50:50 UTC) #8
I have responded on kinuko's version of the patch. I will resolve the rest of
the comments if we decide to move back to this version.

https://codereview.chromium.org/2120233003/diff/60001/third_party/WebKit/Sour...
File third_party/WebKit/Source/platform/exported/WrappedResourceResponse.h
(right):

https://codereview.chromium.org/2120233003/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/platform/exported/WrappedResourceResponse.h:44:
WrappedResourceResponse() { }
On 2016/07/05 14:59:44, kinuko wrote:
> Doesn't it cost us creating a WebURLRespnsePrivateImpl, which is going to be
> disposed soon when it gets bound?
> 
> : WebURLResponse(&m_handle) ?

I don't think it makes sense to have a default constructor on this class at all,
but unfortunately it is used by WebDataSourceImpl. I considered suboptimal
performance to be acceptable in that one case.

Powered by Google App Engine
This is Rietveld 408576698