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

Issue 1303493002: Make UrlRequestContextBuilder take scoped_ptr's (Closed)

Created:
5 years, 4 months ago by pauljensen
Modified:
5 years, 3 months ago
Reviewers:
jam, mmenke
CC:
chromium-reviews, gunsch+watch_chromium.org, cbentzel+watch_chromium.org, chromoting-reviews_chromium.org, samuong+watch_chromium.org, lcwu+watch_chromium.org, Randy Smith (Not in Mondays), wjmaclean
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make UrlRequestContextBuilder take scoped_ptr's when it takes ownership UrlRequestContextBuilder was already taking ownership in most cases, so it should be taking scoped_ptr's instead of raw pointers. This change should help enforce proper ownership and has already identified two ownership bugs. I'm fixing the ownership bugs (a double-free of ProxyConfigService in Cronet and of NetLog in AwURLRequestContextGetter) in this change also. I'm changing UrlRequestContextBuilder to not take ownership of NetLog however as this conflicts with some other uses of NetLog, like how it's exposed via ContentBrowserClient. BUG=508553 TBR=jam Committed: https://crrev.com/53197db553fa979bcdce9836f7346fa898d416fe Cr-Commit-Position: refs/heads/master@{#346637}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 5

Patch Set 6 : add two small comments #

Patch Set 7 : sync and fix tiny resulting build failure #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -73 lines) Patch
M android_webview/browser/net/aw_url_request_context_getter.cc View 1 2 3 4 5 6 3 chunks +9 lines, -8 lines 0 comments Download
M chrome/service/net/service_url_request_context_getter.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/test/chromedriver/net/url_request_context_getter.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M chromecast/net/connectivity_checker_impl.cc View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M components/cronet/android/cronet_url_request_context_adapter.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M components/cronet/android/cronet_url_request_context_adapter.cc View 1 2 3 4 5 6 3 chunks +10 lines, -14 lines 0 comments Download
M components/cronet/android/url_request_context_adapter.cc View 1 2 3 4 5 6 1 chunk +4 lines, -3 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M device/test/usb_test_gadget_impl.cc View 1 2 3 4 5 6 2 chunks +8 lines, -3 lines 0 comments Download
M mojo/services/network/network_context.cc View 1 2 chunks +3 lines, -4 lines 0 comments Download
M net/tools/get_server_time/get_server_time.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/url_request_context_builder.h View 1 2 3 4 5 6 4 chunks +14 lines, -13 lines 0 comments Download
M net/url_request/url_request_context_builder.cc View 1 2 3 4 5 6 7 chunks +11 lines, -10 lines 0 comments Download
M net/url_request/url_request_context_builder_unittest.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/base/url_request_context_getter.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M remoting/base/url_request_context_getter.cc View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 20 (8 generated)
pauljensen
Matt, PTAL. If you're too busy I could pick another reviewer; I selected you as ...
5 years, 4 months ago (2015-08-20 15:24:24 UTC) #2
mmenke
LGTM. I am busy this week, but this is a pretty fast CL to review. ...
5 years, 4 months ago (2015-08-20 15:51:07 UTC) #3
pauljensen
https://codereview.chromium.org/1303493002/diff/80001/net/url_request/url_request_context_builder.cc File net/url_request/url_request_context_builder.cc (right): https://codereview.chromium.org/1303493002/diff/80001/net/url_request/url_request_context_builder.cc#newcode268 net/url_request/url_request_context_builder.cc:268: if (net_log_) { On 2015/08/20 15:51:07, mmenke wrote: > ...
5 years, 4 months ago (2015-08-20 21:45:14 UTC) #4
pauljensen
Ben, PTAL. This is largely a refactoring to simply pass scoped_ptr's in cases where ownership ...
5 years, 4 months ago (2015-08-20 21:49:27 UTC) #6
pauljensen
Ben, it's been a week, ping!
5 years, 3 months ago (2015-08-27 15:09:35 UTC) #7
pauljensen
-ben (who I assume doesn't have time to approve) +jam John, PTAL. This is largely ...
5 years, 3 months ago (2015-08-31 14:15:11 UTC) #9
jam
On 2015/08/31 14:15:11, pauljensen wrote: > -ben (who I assume doesn't have time to approve) ...
5 years, 3 months ago (2015-08-31 20:09:53 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1303493002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1303493002/100001
5 years, 3 months ago (2015-09-01 11:45:23 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/92569)
5 years, 3 months ago (2015-09-01 11:56:54 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1303493002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1303493002/120001
5 years, 3 months ago (2015-09-01 12:15:24 UTC) #18
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 3 months ago (2015-09-01 13:19:53 UTC) #19
commit-bot: I haz the power
5 years, 3 months ago (2015-09-01 13:20:31 UTC) #20
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/53197db553fa979bcdce9836f7346fa898d416fe
Cr-Commit-Position: refs/heads/master@{#346637}

Powered by Google App Engine
This is Rietveld 408576698