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

Issue 6825038: Create a content::ResourceContext. (Closed)

Created:
9 years, 8 months ago by willchan no longer on Chromium
Modified:
9 years, 7 months ago
CC:
chromium-reviews, michaeln
Visibility:
Public.

Description

Create a content::ResourceContext. Each Profile will have a ResourceContext which lives within the ProfileIOData on the IO thread, although it is created on the UI thread (since that's where the ProfileIOData is created). Move webkit_database::DatabaseTracker into ResourceContext and out of ChromeURLRequestContext. Fixed WorkerProcessHost to create its own ResourceMessageFilter that uses a URLRequestContextOverride pointing to its own URLRequestContext, rather than using the default request context. BUG=78596 TEST=existing Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=81774

Patch Set 1 #

Patch Set 2 : Temporarily patch in WeakPtr changes. #

Patch Set 3 : Fix TestingProfile #

Patch Set 4 : Fix RDH's test. #

Patch Set 5 : Fix WeakPtr usage. #

Patch Set 6 : Don't bother with WeakPtr, use leak tracking. #

Patch Set 7 : Fix link error. #

Patch Set 8 : Oops, inverted the assertions. #

Total comments: 2

Patch Set 9 : Make everything build again. #

Patch Set 10 : Work around warning. #

Patch Set 11 : Add missing files. #

Patch Set 12 : Fix dependencies. #

Total comments: 10

Patch Set 13 : Address comments, fix tests. #

Total comments: 2

Patch Set 14 : Address jam's comments. #

Patch Set 15 : Merge. #

Patch Set 16 : Fix new code that uses deprecated/deleted constructor. #

Patch Set 17 : OK, fix last build errors. #

Patch Set 18 : Remove this unnecessary member. #

Patch Set 19 : Own database_tracker. #

Total comments: 11

Patch Set 20 : Fix eroman's nits. #

Patch Set 21 : Fix test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+425 lines, -173 lines) Patch
M chrome/browser/net/chrome_url_request_context.h View 4 chunks +0 lines, -10 lines 0 comments Download
M chrome/browser/net/chrome_url_request_context.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/net/view_blob_internals_job_factory.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/profiles/off_the_record_profile_io_data.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +20 lines, -11 lines 0 comments Download
M chrome/browser/profiles/profile.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.h View 1 2 3 4 5 6 7 8 4 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 9 chunks +25 lines, -17 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +24 lines, -11 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +44 lines, -23 lines 0 comments Download
M chrome/browser/renderer_host/browser_render_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/web_resource/web_resource_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/testing_profile.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/test/testing_profile.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/appcache/view_appcache_internals_job_factory.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/browser_child_process_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +0 lines, -14 lines 0 comments Download
M content/browser/browser_child_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -20 lines 0 comments Download
A content/browser/mock_resource_context.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +31 lines, -0 lines 0 comments Download
A content/browser/mock_resource_context.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +23 lines, -0 lines 0 comments Download
M content/browser/ppapi_broker_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/resource_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/resource_dispatcher_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +5 lines, -3 lines 0 comments Download
M content/browser/renderer_host/resource_message_filter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +7 lines, -0 lines 0 comments Download
M content/browser/renderer_host/resource_message_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +6 lines, -1 line 0 comments Download
A content/browser/resource_context.h View 1 2 3 4 5 6 7 8 1 chunk +41 lines, -0 lines 0 comments Download
A content/browser/resource_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +31 lines, -0 lines 0 comments Download
M content/browser/worker_host/worker_message_filter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +9 lines, -4 lines 0 comments Download
M content/browser/worker_host/worker_message_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +9 lines, -4 lines 0 comments Download
M content/browser/worker_host/worker_process_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +27 lines, -12 lines 0 comments Download
M content/browser/worker_host/worker_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 7 chunks +50 lines, -12 lines 0 comments Download
M content/browser/worker_host/worker_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -4 lines 0 comments Download
M content/browser/worker_host/worker_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 7 chunks +12 lines, -9 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
willchan no longer on Chromium
jam: everything in content/, and whatever you're interested in eroman: everything else
9 years, 8 months ago (2011-04-11 18:30:04 UTC) #1
jam
http://codereview.chromium.org/6825038/diff/3042/content/browser/resource_context.h File content/browser/resource_context.h (right): http://codereview.chromium.org/6825038/diff/3042/content/browser/resource_context.h#newcode34 content/browser/resource_context.h:34: // ResourceContextGetter is used purely for acquiring a ResourceContext ...
9 years, 8 months ago (2011-04-11 22:00:41 UTC) #2
willchan no longer on Chromium
http://codereview.chromium.org/6825038/diff/3042/content/browser/resource_context.h File content/browser/resource_context.h (right): http://codereview.chromium.org/6825038/diff/3042/content/browser/resource_context.h#newcode34 content/browser/resource_context.h:34: // ResourceContextGetter is used purely for acquiring a ResourceContext ...
9 years, 8 months ago (2011-04-11 22:13:05 UTC) #3
jam
On Mon, Apr 11, 2011 at 3:13 PM, <willchan@chromium.org> wrote: > > > http://codereview.chromium.org/6825038/diff/3042/content/browser/resource_context.h > ...
9 years, 8 months ago (2011-04-11 22:20:49 UTC) #4
willchan no longer on Chromium
On Tue, Apr 12, 2011 at 12:20 AM, John Abd-El-Malek <jam@chromium.org>wrote: > > > On ...
9 years, 8 months ago (2011-04-11 22:39:14 UTC) #5
jam
On Mon, Apr 11, 2011 at 3:39 PM, William Chan (ι™ˆζ™Ίζ˜Œ) <willchan@chromium.org>wrote: > On Tue, ...
9 years, 8 months ago (2011-04-12 00:11:36 UTC) #6
willchan no longer on Chromium
On Tue, Apr 12, 2011 at 2:11 AM, John Abd-El-Malek <jam@chromium.org> wrote: > > > ...
9 years, 8 months ago (2011-04-12 07:45:30 UTC) #7
willchan no longer on Chromium
OK John, I've redone the code not to use a ResourceContextGetter. PTAL.
9 years, 8 months ago (2011-04-13 13:18:02 UTC) #8
jam
http://codereview.chromium.org/6825038/diff/13001/chrome/browser/profiles/profile.h File chrome/browser/profiles/profile.h (right): http://codereview.chromium.org/6825038/diff/13001/chrome/browser/profiles/profile.h#newcode350 chrome/browser/profiles/profile.h:350: virtual const content::ResourceContext& GetResourceContext() = 0; nit: comment http://codereview.chromium.org/6825038/diff/13001/chrome/browser/renderer_host/browser_render_process_host.cc ...
9 years, 8 months ago (2011-04-13 16:43:06 UTC) #9
willchan no longer on Chromium
Note that in fixing the tests, I also fixed the WorkerProcessHost to use a ResourceMessageFilter ...
9 years, 8 months ago (2011-04-13 18:03:44 UTC) #10
jam
http://codereview.chromium.org/6825038/diff/13001/content/browser/worker_host/worker_service.h File content/browser/worker_host/worker_service.h (right): http://codereview.chromium.org/6825038/diff/13001/content/browser/worker_host/worker_service.h#newcode24 content/browser/worker_host/worker_service.h:24: class WorkerService : public base::NonThreadSafe { On 2011/04/13 18:03:44, ...
9 years, 8 months ago (2011-04-13 19:20:30 UTC) #11
willchan no longer on Chromium
http://codereview.chromium.org/6825038/diff/13001/content/browser/worker_host/worker_service.h File content/browser/worker_host/worker_service.h (right): http://codereview.chromium.org/6825038/diff/13001/content/browser/worker_host/worker_service.h#newcode24 content/browser/worker_host/worker_service.h:24: class WorkerService : public base::NonThreadSafe { On 2011/04/13 19:20:30, ...
9 years, 8 months ago (2011-04-13 22:16:25 UTC) #12
willchan no longer on Chromium
Oh, and I'll take out the stacktrace stuff since I don't need it anymore. I'll ...
9 years, 8 months ago (2011-04-13 22:16:49 UTC) #13
jam
On Wed, Apr 13, 2011 at 3:16 PM, <willchan@chromium.org> wrote: > > > http://codereview.chromium.org/6825038/diff/13001/content/browser/worker_host/worker_service.h > ...
9 years, 8 months ago (2011-04-13 22:36:08 UTC) #14
willchan no longer on Chromium
OK, all updated as requested. Looks like new process hosts are still coming in. I ...
9 years, 8 months ago (2011-04-14 14:46:10 UTC) #15
jam
lgtm
9 years, 8 months ago (2011-04-14 16:26:52 UTC) #16
eroman
LGTM aside from (http://codereview.chromium.org/6825038/diff/19043/content/browser/renderer_host/resource_message_filter.cc#newcode22) http://codereview.chromium.org/6825038/diff/19043/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): http://codereview.chromium.org/6825038/diff/19043/chrome/browser/profiles/profile_io_data.cc#newcode257 chrome/browser/profiles/profile_io_data.cc:257: } nit: add a newline ...
9 years, 8 months ago (2011-04-15 03:05:27 UTC) #17
willchan no longer on Chromium
I used const Foo& to help document that it can't be NULL. I can see ...
9 years, 8 months ago (2011-04-15 16:58:02 UTC) #18
commit-bot: I haz the power
Try job failure for 6825038-24002 on linux: http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux&number=21978
9 years, 8 months ago (2011-04-15 17:21:46 UTC) #19
commit-bot: I haz the power
Change committed as 81774
9 years, 8 months ago (2011-04-15 18:58:13 UTC) #20
Timur Iskhodzhanov
Will, you've made the whole memory waterfall red :) Your mailbox is full of "build ...
9 years, 8 months ago (2011-04-16 11:26:33 UTC) #21
willchan no longer on Chromium
Er, it is? Crap. No, I don't see any right now, but my inbox fills ...
9 years, 8 months ago (2011-04-16 17:46:23 UTC) #22
Timur Iskhodzhanov
It took care of it already :)
9 years, 8 months ago (2011-04-16 17:51:02 UTC) #23
willchan no longer on Chromium
9 years, 8 months ago (2011-04-16 18:03:09 UTC) #24
I see now. Thanks! You're always cleaning up my messes, I really appreciate
it. I will try to remember to run valgrind bots more often.

On Sat, Apr 16, 2011 at 7:51 PM, <timurrrr@chromium.org> wrote:

> It took care of it already :)
>
>
> http://codereview.chromium.org/6825038/
>

Powered by Google App Engine
This is Rietveld 408576698