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

Issue 13701: Use automatic memory management for URLRequestContext's members.... (Closed)

Created:
12 years ago by eroman
Modified:
9 years, 6 months ago
Reviewers:
wtc
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Use automatic memory management for URLRequestContext's members. Also make ProxyService refcounted so the sharing between profiles is explicit. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=6966

Patch Set 1 #

Total comments: 18

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 4

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+153 lines, -185 lines) Patch
M chrome/browser/profile.cc View 1 2 3 5 chunks +8 lines, -18 lines 0 comments Download
M net/build/net.vcproj View 1 chunk +4 lines, -0 lines 0 comments Download
M net/http/http_network_layer.h View 2 3 2 chunks +1 line, -2 lines 0 comments Download
M net/http/http_network_layer_unittest.cc View 1 2 3 3 chunks +3 lines, -8 lines 0 comments Download
M net/http/http_network_session.h View 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_network_transaction_unittest.cc View 1 2 3 15 chunks +20 lines, -43 lines 0 comments Download
M net/http/http_transaction_winhttp.h View 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_transaction_winhttp.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_transaction_winhttp_unittest.cc View 1 2 3 2 chunks +3 lines, -7 lines 0 comments Download
M net/net.xcodeproj/project.pbxproj View 4 chunks +4 lines, -0 lines 0 comments Download
M net/net_lib.scons View 1 chunk +1 line, -0 lines 0 comments Download
M net/proxy/proxy_script_fetcher_unittest.cc View 1 1 chunk +2 lines, -6 lines 0 comments Download
M net/proxy/proxy_service.h View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M net/proxy/proxy_service.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M net/proxy/proxy_service_unittest.cc View 1 2 3 22 chunks +58 lines, -51 lines 0 comments Download
M net/url_request/url_request_context.h View 1 2 3 3 chunks +11 lines, -17 lines 0 comments Download
A net/url_request/url_request_context.cc View 1 chunk +14 lines, -0 lines 0 comments Download
M net/url_request/url_request_unittest.h View 1 2 3 2 chunks +3 lines, -9 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 2 chunks +3 lines, -9 lines 0 comments Download
M webkit/glue/plugins/mozilla_extensions.cc View 1 chunk +2 lines, -1 line 0 comments Download
M webkit/tools/test_shell/plugin_tests.cc View 1 chunk +1 line, -5 lines 0 comments Download
M webkit/tools/test_shell/test_shell_request_context.cc View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
eroman
This follows from a review comment you made about the "delete"s being repeated in several ...
12 years ago (2008-12-10 09:40:21 UTC) #1
wtc
LGTM. Thank you! http://codereview.chromium.org/13701/diff/1/5 File net/http/http_network_transaction_unittest.cc (right): http://codereview.chromium.org/13701/diff/1/5#newcode900 Line 900: CreateSession(proxy_service.get())); I think .get() is ...
12 years ago (2008-12-10 22:11:20 UTC) #2
eroman
http://codereview.chromium.org/13701/diff/1/8 File net/proxy/proxy_service.h (right): http://codereview.chromium.org/13701/diff/1/8#newcode86 Line 86: class ProxyService : public base::RefCounted<ProxyService> { On 2008/12/10 ...
12 years ago (2008-12-10 22:20:16 UTC) #3
wtc
http://codereview.chromium.org/13701/diff/1/8 File net/proxy/proxy_service.h (right): http://codereview.chromium.org/13701/diff/1/8#newcode86 Line 86: class ProxyService : public base::RefCounted<ProxyService> { Thanks for ...
12 years ago (2008-12-10 22:25:52 UTC) #4
eroman
http://codereview.chromium.org/13701/diff/1/5 File net/http/http_network_transaction_unittest.cc (right): http://codereview.chromium.org/13701/diff/1/5#newcode900 Line 900: CreateSession(proxy_service.get())); On 2008/12/10 22:11:20, wtc wrote: > I ...
12 years ago (2008-12-12 20:40:28 UTC) #5
eroman
Added "test_shell_request_context.cc" to the CL in patchset 3.
12 years ago (2008-12-12 21:30:17 UTC) #6
eroman
Correction: meant to say "plugin_tests.cc" not "test_shell_request_context.cc"
12 years ago (2008-12-12 21:31:37 UTC) #7
wtc
http://codereview.chromium.org/13701/diff/1/5 File net/http/http_network_transaction_unittest.cc (right): http://codereview.chromium.org/13701/diff/1/5#newcode900 Line 900: CreateSession(proxy_service.get())); On 2008/12/12 20:40:28, eroman wrote: > > ...
12 years ago (2008-12-12 22:03:58 UTC) #8
wtc
LGTM on Patch Set 3. http://codereview.chromium.org/13701/diff/427/431 File net/http/http_network_transaction_unittest.cc (right): http://codereview.chromium.org/13701/diff/427/431#newcode206 Line 206: net::HttpNetworkSession* CreateSession() { ...
12 years ago (2008-12-12 22:13:05 UTC) #9
eroman
http://codereview.chromium.org/13701/diff/1/5 File net/http/http_network_transaction_unittest.cc (right): http://codereview.chromium.org/13701/diff/1/5#newcode900 Line 900: CreateSession(proxy_service.get())); On 2008/12/12 22:03:58, wtc wrote: > On ...
12 years ago (2008-12-12 23:02:24 UTC) #10
eroman
Note: I had to roll-back this change, as it caused crashes in theUI-tests. The problem ...
12 years ago (2008-12-15 02:06:18 UTC) #11
wtc
12 years ago (2008-12-15 17:55:47 UTC) #12
On 2008/12/15 02:06:18, eroman wrote:
> Note: I had to roll-back this change, as it caused crashes in theUI-tests.
> 
> The problem was that the CookieStore(URLRequestContext::cookie_store_) may
> depend on a PersistentCookieStore* that is owned by the superclass. 
> 
> Hence by changing the destruction order of cookie_store_ to instead happen in
> the base class, it wound up accessing a dependency which had already been
freed
> (ProfileImpl::RequestContext::cookie_db_).
> 
> Given this usage, I no longer think this refactor is worthwhile and will put
it
> on hold.

Sorry to hear that.  Perhaps those three members are intended
to be created and destroyed by the subclasses.  We should add
a comment to summarize your findings so that nobody will try
this again.

Powered by Google App Engine
This is Rietveld 408576698