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

Issue 1439053002: Change ProxyResolver::GetProxyForURL() to take a scoped_ptr<Request>* rather than a RequestHandle* (Closed)

Created:
5 years, 1 month ago by Olli Raula
Modified:
4 years, 10 months ago
Reviewers:
eroman, davidben
CC:
chromium-reviews, cbentzel+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, Paweł Hajdan Jr., darin (slow to review), ben+mojo_chromium.org, davidben
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change ProxyResolver::GetProxyForURL() to take a scoped_ptr<Request>* rather than a RequestHandle* * ProxyResolver::GetProxyForURL() fills a |scoped_pointer<Request>*| rather than a |void*| * ProxyResolver::CancelRequest(void*) has been removed. Requests are instead cancelled by resetting the scoped_ptr<Request>. This makes for less error prone code as cancellation of requests is automatic when the scoped_ptr<Request> goes out of scope. ProxyResolver::GetLoadState() is removed and replaced by Request::GetLoadState(). Also made some renaming, as there were similar class named Job or Request. Now they are all Job and this new thing is Request. Referencing by address to object in vector was not wise in net/proxy/mojo_proxy_resolver_impl_unittest.cc which is now fixed by using scoped_ptrs in that vector. BUG=478934 Committed: https://crrev.com/a750e126346aa42df1b0cbc2ae6a58abbe7a5069 Cr-Commit-Position: refs/heads/master@{#377856}

Patch Set 1 #

Total comments: 6

Patch Set 2 : ToT #

Patch Set 3 : Some fix to get new trybot logs #

Patch Set 4 : Fixed comments and all other errors. #

Patch Set 5 : ToT #

Total comments: 8

Patch Set 6 : Remove weakptr and some scoped_refptr #

Patch Set 7 : Restore refptr due windows error #

Total comments: 30

Patch Set 8 : Fixes #

Patch Set 9 : ToT #

Total comments: 6

Patch Set 10 : Last fixes #

Total comments: 4

Patch Set 11 : Restore scoped_ptr to mock and nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+696 lines, -721 lines) Patch
M content/browser/resolve_proxy_msg_helper_unittest.cc View 6 chunks +27 lines, -27 lines 0 comments Download
M net/http/http_network_transaction_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +1 line, -8 lines 0 comments Download
M net/proxy/mock_proxy_resolver.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +29 lines, -25 lines 0 comments Download
M net/proxy/mock_proxy_resolver.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +45 lines, -40 lines 0 comments Download
M net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc View 1 2 3 4 1 chunk +1 line, -7 lines 0 comments Download
M net/proxy/mojo_proxy_resolver_impl.cc View 1 2 3 4 2 chunks +3 lines, -7 lines 0 comments Download
M net/proxy/mojo_proxy_resolver_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 6 chunks +81 lines, -62 lines 0 comments Download
M net/proxy/multi_threaded_proxy_resolver.cc View 1 2 3 4 5 6 7 6 chunks +30 lines, -39 lines 0 comments Download
M net/proxy/multi_threaded_proxy_resolver_unittest.cc View 1 2 3 4 5 11 chunks +12 lines, -19 lines 0 comments Download
M net/proxy/proxy_resolver.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -10 lines 0 comments Download
M net/proxy/proxy_resolver_factory_mojo.cc View 1 2 3 4 5 6 7 8 9 7 chunks +55 lines, -42 lines 0 comments Download
M net/proxy/proxy_resolver_factory_mojo_unittest.cc View 1 2 3 4 6 chunks +8 lines, -8 lines 0 comments Download
M net/proxy/proxy_resolver_mac.cc View 3 chunks +2 lines, -15 lines 0 comments Download
M net/proxy/proxy_resolver_perftest.cc View 1 2 3 4 1 chunk +1 line, -8 lines 0 comments Download
M net/proxy/proxy_resolver_v8_tracing.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -10 lines 0 comments Download
M net/proxy/proxy_resolver_v8_tracing.cc View 1 2 3 4 5 6 7 8 3 chunks +30 lines, -17 lines 0 comments Download
M net/proxy/proxy_resolver_v8_tracing_unittest.cc View 1 2 3 4 5 26 chunks +51 lines, -39 lines 0 comments Download
M net/proxy/proxy_resolver_v8_tracing_wrapper.cc View 1 2 3 4 3 chunks +2 lines, -15 lines 0 comments Download
M net/proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc View 1 2 3 4 5 27 chunks +52 lines, -40 lines 0 comments Download
M net/proxy/proxy_resolver_winhttp.cc View 1 2 3 4 3 chunks +2 lines, -15 lines 0 comments Download
M net/proxy/proxy_service.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +8 lines, -25 lines 0 comments Download
M net/proxy/proxy_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 63 chunks +237 lines, -235 lines 0 comments Download
M net/url_request/url_request_ftp_job_unittest.cc View 1 2 3 4 2 chunks +8 lines, -8 lines 0 comments Download

Messages

Total messages: 41 (11 generated)
Olli Raula
Hi, it would be nice if you have some time to take a look and ...
5 years, 1 month ago (2015-11-17 11:40:32 UTC) #3
eroman
Sure I will take a look later today, and see if I have ideas about ...
5 years, 1 month ago (2015-11-17 18:39:55 UTC) #4
Olli Raula
Did you got any clue?
5 years, 1 month ago (2015-11-19 09:36:16 UTC) #5
eroman
https://codereview.chromium.org/1439053002/diff/1/net/proxy/mock_proxy_resolver.cc File net/proxy/mock_proxy_resolver.cc (right): https://codereview.chromium.org/1439053002/diff/1/net/proxy/mock_proxy_resolver.cc#newcode14 net/proxy/mock_proxy_resolver.cc:14: MockAsyncProxyResolver* resolver) Doesn't the job already contain the resolver? ...
5 years ago (2015-11-24 01:21:00 UTC) #6
Olli Raula
Hi, thanks for tips. I have done a lot of work and learned much. Now ...
5 years ago (2015-12-18 14:13:48 UTC) #7
eroman
I will be out around christmas/new year, but will probably manage to do a review ...
5 years ago (2015-12-18 17:53:47 UTC) #8
Olli Raula
On 2015/12/18 17:53:47, eroman wrote: > I will be out around christmas/new year, but will ...
5 years ago (2015-12-21 10:55:24 UTC) #11
Olli Raula
Ping?
4 years, 11 months ago (2016-01-07 08:37:57 UTC) #12
Olli Raula
Could you check this, please?
4 years, 11 months ago (2016-01-22 07:29:32 UTC) #13
eroman
ops forgot, looking now!
4 years, 11 months ago (2016-01-22 21:58:07 UTC) #14
eroman
I commented on two of the classes (MultiThreadProxyResolver and ProxyResolverV8Tracing) so far, but those responses ...
4 years, 11 months ago (2016-01-23 02:17:01 UTC) #15
Olli Raula
Thanks for review, now those comments are addressed to everywhere. Some thougs: also refptr is ...
4 years, 10 months ago (2016-02-15 10:54:07 UTC) #16
Olli Raula
Hi, could you please check this as I am in a hurry to finish this.
4 years, 10 months ago (2016-02-18 08:29:06 UTC) #17
eroman
Thanks for driving this patch forward! I am working on review comments right now, hope ...
4 years, 10 months ago (2016-02-24 01:23:07 UTC) #18
eroman
Great work on this change! The latest patchset is looking very close. Just want to ...
4 years, 10 months ago (2016-02-24 03:08:07 UTC) #19
Olli Raula
Thanks for reading it through! now they should be fixed. I hope you have time ...
4 years, 10 months ago (2016-02-24 13:06:25 UTC) #20
eroman
https://codereview.chromium.org/1439053002/diff/120001/net/proxy/mock_proxy_resolver.h File net/proxy/mock_proxy_resolver.h (right): https://codereview.chromium.org/1439053002/diff/120001/net/proxy/mock_proxy_resolver.h#newcode54 net/proxy/mock_proxy_resolver.h:54: RequestImpl(scoped_refptr<Job> job); On 2016/02/24 03:08:06, eroman wrote: > mark ...
4 years, 10 months ago (2016-02-24 19:20:29 UTC) #21
Olli Raula
Thanks. Added davidben for content(or could we use tbr for that?) sorry for missing some ...
4 years, 10 months ago (2016-02-25 08:43:27 UTC) #23
eroman
You can TBR David for the content change (content/browser/resolve_proxy_msg_helper_unittest.cc) once I have approved the rest ...
4 years, 10 months ago (2016-02-25 16:19:01 UTC) #25
eroman
OK so I can't tell exactly what goes wrong, but I am pretty sure it ...
4 years, 10 months ago (2016-02-25 16:54:32 UTC) #26
eroman
Ah! I have an idea: The destructor in your failing patchset was doing this: job_->Resolver()->AddCancelledJob(std::move(job_)); ...
4 years, 10 months ago (2016-02-25 17:25:34 UTC) #27
eroman
I confirmed with C++ expert rsleevi, and the theory above is correct. On Thu, Feb ...
4 years, 10 months ago (2016-02-25 17:51:58 UTC) #28
eroman
lgtm! https://codereview.chromium.org/1439053002/diff/180001/net/proxy/mock_proxy_resolver.h File net/proxy/mock_proxy_resolver.h (right): https://codereview.chromium.org/1439053002/diff/180001/net/proxy/mock_proxy_resolver.h#newcode27 net/proxy/mock_proxy_resolver.h:27: class Job : public base::RefCounted<Job> { Based on ...
4 years, 10 months ago (2016-02-25 17:53:44 UTC) #29
davidben
content lgtm
4 years, 10 months ago (2016-02-25 18:12:30 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1439053002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1439053002/200001
4 years, 10 months ago (2016-02-26 09:03:35 UTC) #34
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 10 months ago (2016-02-26 09:19:05 UTC) #36
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/a750e126346aa42df1b0cbc2ae6a58abbe7a5069 Cr-Commit-Position: refs/heads/master@{#377856}
4 years, 10 months ago (2016-02-26 09:20:27 UTC) #38
Olli Raula
Thanks a lot! I fixed that refptr.
4 years, 10 months ago (2016-02-26 10:20:23 UTC) #39
eroman
patchset 11 LGTM
4 years, 10 months ago (2016-02-26 19:04:01 UTC) #40
eroman
4 years, 9 months ago (2016-02-29 18:49:00 UTC) #41
Message was sent while issue was closed.
A revert of this CL (patchset #11 id:200001) has been created in
https://codereview.chromium.org/1745133002/ by eroman@chromium.org.

The reason for reverting is: Top crasher on Canary has PAC script cancellation
on callstack. Very likely a bug or interaction with this CL.

Reverting until I have a chance to fully investigate..

Powered by Google App Engine
This is Rietveld 408576698