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

Issue 1702016: Changed UrlFetcher to use a MessageLoopProxy instead of directly relying on C... (Closed)

Created:
10 years, 7 months ago by sanjeevr
Modified:
9 years, 7 months ago
CC:
chromium-reviews, ncarter (slow), idana, ben+cc_chromium.org, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr., tim (not reviewing)
Visibility:
Public.

Description

Changed UrlFetcher to use a MessageLoopProxy instead of directly relying on ChromeThread. This will allow us to make UrlFetcher independent of ChromeThread and we can then move it to chrome/common. BUG=None TEST=UrlFetcher unit-tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=46282

Patch Set 1 #

Total comments: 6

Patch Set 2 : Code review comments addressed #

Patch Set 3 : Added missing files #

Patch Set 4 : Addressed Eric's comments #

Total comments: 4

Patch Set 5 : Delete Context on IO thread #

Patch Set 6 : Added missing file #

Patch Set 7 : Fixed unit tests #

Patch Set 8 : Fixed lint errors #

Total comments: 7

Patch Set 9 : '' #

Total comments: 2

Patch Set 10 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -45 lines) Patch
M base/message_loop_proxy.h View 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/chrome_plugin_unittest.cc View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/chrome_thread.cc View 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/net/chrome_url_request_context.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/net/chrome_url_request_context.cc View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/net/url_fetcher.cc View 1 2 3 4 5 6 7 8 8 chunks +19 lines, -13 lines 0 comments Download
M chrome/browser/net/url_fetcher_unittest.cc View 1 2 3 4 5 6 7 8 6 chunks +24 lines, -15 lines 0 comments Download
M chrome/browser/net/url_request_context_getter.h View 1 2 3 4 5 6 7 8 9 1 chunk +19 lines, -3 lines 0 comments Download
M chrome/browser/net/url_request_context_getter.cc View 6 7 8 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/http_bridge.h View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/http_bridge.cc View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/http_bridge_unittest.cc View 1 2 3 4 5 6 7 8 5 chunks +27 lines, -10 lines 0 comments Download
M chrome/test/testing_profile.cc View 1 2 3 4 5 6 7 8 4 chunks +8 lines, -1 line 0 comments Download

Messages

Total messages: 18 (0 generated)
sanjeevr
10 years, 7 months ago (2010-04-29 23:01:30 UTC) #1
darin (slow to review)
http://codereview.chromium.org/1702016/diff/1/8 File chrome/browser/net/url_fetcher.cc (left): http://codereview.chromium.org/1702016/diff/1/8#oldcode167 chrome/browser/net/url_fetcher.cc:167: DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); it seems a tad unfortunate to lose these ...
10 years, 7 months ago (2010-04-29 23:17:39 UTC) #2
eroman
This approach looks good to me. I agree with Darin, that preserving the asserts for ...
10 years, 7 months ago (2010-04-29 23:48:10 UTC) #3
sanjeevr
Made all the changes. Please take a look. http://codereview.chromium.org/1702016/diff/1/8 File chrome/browser/net/url_fetcher.cc (left): http://codereview.chromium.org/1702016/diff/1/8#oldcode167 chrome/browser/net/url_fetcher.cc:167: DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); ...
10 years, 7 months ago (2010-04-29 23:55:36 UTC) #4
eroman
LGTM http://codereview.chromium.org/1702016/diff/21002/33009 File chrome/browser/net/chrome_url_request_context.h (right): http://codereview.chromium.org/1702016/diff/21002/33009#newcode244 chrome/browser/net/chrome_url_request_context.h:244: // the destructor and GetURLRequestContext(). Please update comment ...
10 years, 7 months ago (2010-04-30 00:09:54 UTC) #5
eroman
http://codereview.chromium.org/1702016/diff/21002/33001 File chrome/test/testing_profile.cc (left): http://codereview.chromium.org/1702016/diff/21002/33001#oldcode100 chrome/test/testing_profile.cc:100: // a leak if your test does not have ...
10 years, 7 months ago (2010-04-30 00:11:45 UTC) #6
eroman
I take back my lgtm: there is a subtle problem in http_bridge.cc that needs to ...
10 years, 7 months ago (2010-04-30 00:26:24 UTC) #7
sanjeevr
I thought about this case and (perhaps mistakenly) assumed it was OK. Do all subclasses ...
10 years, 7 months ago (2010-04-30 00:37:49 UTC) #8
sanjeevr
http://codereview.chromium.org/1702016/diff/21002/33001 File chrome/test/testing_profile.cc (left): http://codereview.chromium.org/1702016/diff/21002/33001#oldcode100 chrome/test/testing_profile.cc:100: // a leak if your test does not have ...
10 years, 7 months ago (2010-04-30 00:42:23 UTC) #9
eroman
> I thought about this case and (perhaps mistakenly) assumed it was OK. Do all ...
10 years, 7 months ago (2010-04-30 01:14:03 UTC) #10
sanjeevr
Got it. Working on the fix. Thanks a lot for the explanation. On Thu, Apr ...
10 years, 7 months ago (2010-04-30 01:20:26 UTC) #11
sanjeevr
OK so I have changed this so that URLRequestContextGetter now owns the context pointer and ...
10 years, 7 months ago (2010-04-30 06:09:15 UTC) #12
sanjeevr
Ping? On Thu, Apr 29, 2010 at 11:09 PM, <sanjeevr@chromium.org> wrote: > OK so I ...
10 years, 7 months ago (2010-04-30 19:39:18 UTC) #13
darin (slow to review)
http://codereview.chromium.org/1702016/diff/31002/61010 File chrome/browser/net/url_request_context_getter.h (right): http://codereview.chromium.org/1702016/diff/31002/61010#newcode19 chrome/browser/net/url_request_context_getter.h:19: : public base::RefCountedThreadSafe<URLRequestContextGetter> { now that GetIOMessageLoopProxy is available, ...
10 years, 7 months ago (2010-04-30 20:58:02 UTC) #14
eroman
LGTM http://codereview.chromium.org/1702016/diff/31002/61013 File chrome/browser/net/url_request_context_getter.cc (right): http://codereview.chromium.org/1702016/diff/31002/61013#newcode22 chrome/browser/net/url_request_context_getter.cc:22: return url_request_context_; Can you similarly assert that this ...
10 years, 7 months ago (2010-04-30 21:06:29 UTC) #15
sanjeevr
I now have a new implementation using a trait. I am sorry for the multiple ...
10 years, 7 months ago (2010-05-01 01:30:08 UTC) #16
eroman
LGTM http://codereview.chromium.org/1702016/diff/39002/47013 File chrome/browser/net/url_request_context_getter.h (right): http://codereview.chromium.org/1702016/diff/39002/47013#newcode38 chrome/browser/net/url_request_context_getter.h:38: virtual ~URLRequestContextGetter() { } please remove the space ...
10 years, 7 months ago (2010-05-03 17:55:28 UTC) #17
sanjeevr
10 years, 7 months ago (2010-05-03 18:05:53 UTC) #18
Done, waiting for Darin's review.

http://codereview.chromium.org/1702016/diff/39002/47013
File chrome/browser/net/url_request_context_getter.h (right):

http://codereview.chromium.org/1702016/diff/39002/47013#newcode38
chrome/browser/net/url_request_context_getter.h:38: virtual
~URLRequestContextGetter() { }
On 2010/05/03 17:55:29, eroman wrote:
> please remove the space inside brackets.
> 
> (style guide says this in
>
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Horizo...
> )

Done.

Yeah I wasn't sure of this. I normally never use this style and I prefer to use
braces just like a method that actually had a body, but I have had review
comments requesting this style recently :)

Powered by Google App Engine
This is Rietveld 408576698