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

Issue 10885044: Remove storage context accessors from ResourceContext. (Closed)

Created:
8 years, 3 months ago by awong
Modified:
8 years, 3 months ago
Reviewers:
michaeln, piman
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Visibility:
Public.

Description

Remove storage context accessors from ResourceContext. ResourceContext is the IO thread projection of the Profile. Since one profile may now have multiple StoragePartitions (and thus multiple storage contexts), we need to remove these accessors. All code in the IO thread has enough information to find their appropriate storage context objects without needing to grab it through the ResourceContext. The only users of the ResourceContext storage context APIs are in worker_host classes. As a result of this change, a number of APIs that previously just took 1 ResourceContext now need to take 4 additional objects. We could create a StoragePartitionForIO class that parallels StoragePartition, but since the API ugliness is purely limited to workers, the abstraction isn't worth its weight. BUG=85121 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=156126

Patch Set 1 #

Patch Set 2 : see if using partition_id simplifies things #

Patch Set 3 : add comment. #

Patch Set 4 : merged to ToT #

Total comments: 1

Patch Set 5 : now with WorkerStoragePartition #

Patch Set 6 : remove id #

Patch Set 7 : class-ified #

Patch Set 8 : 80-chars #

Total comments: 2

Patch Set 9 : const-ed #

Total comments: 1

Patch Set 10 : teh #

Unified diffs Side-by-side diffs Delta from patch set Stats (+247 lines, -96 lines) Patch
M content/browser/debugger/worker_devtools_manager.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 3 chunks +13 lines, -3 lines 0 comments Download
M content/browser/resource_context_impl.h View 1 chunk +1 line, -6 lines 0 comments Download
M content/browser/resource_context_impl.cc View 1 2 3 4 5 6 3 chunks +1 line, -40 lines 0 comments Download
M content/browser/worker_host/worker_message_filter.h View 1 2 3 4 5 6 3 chunks +6 lines, -5 lines 0 comments Download
M content/browser/worker_host/worker_message_filter.cc View 1 2 3 4 3 chunks +6 lines, -2 lines 0 comments Download
M content/browser/worker_host/worker_process_host.h View 1 2 3 4 7 chunks +24 lines, -3 lines 0 comments Download
M content/browser/worker_host/worker_process_host.cc View 1 2 3 4 5 6 7 14 chunks +29 lines, -18 lines 0 comments Download
M content/browser/worker_host/worker_service_impl.h View 1 2 3 4 5 6 3 chunks +9 lines, -2 lines 0 comments Download
M content/browser/worker_host/worker_service_impl.cc View 1 2 3 4 12 chunks +29 lines, -17 lines 0 comments Download
A content/browser/worker_host/worker_storage_partition.h View 1 2 3 4 5 6 7 8 9 1 chunk +74 lines, -0 lines 0 comments Download
A content/browser/worker_host/worker_storage_partition.cc View 1 2 3 4 5 6 1 chunk +52 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
awong
8 years, 3 months ago (2012-08-30 02:16:51 UTC) #1
michaeln
i know this isn't up for review, but some thoughts... https://chromiumcodereview.appspot.com/10885044/diff/6002/content/public/browser/storage_partition.h File content/public/browser/storage_partition.h (right): https://chromiumcodereview.appspot.com/10885044/diff/6002/content/public/browser/storage_partition.h#newcode47 ...
8 years, 3 months ago (2012-08-30 21:48:45 UTC) #2
awong
On 2012/08/30 21:48:45, michaeln wrote: > i know this isn't up for review, but some ...
8 years, 3 months ago (2012-08-30 22:26:06 UTC) #3
michaeln
Another public content interface that i think is affected by ResourceContext stuff is ResourceDispatcherHostDelegate. The ...
8 years, 3 months ago (2012-08-30 22:55:39 UTC) #4
awong
I'm looking through ChromeResourceDispatcherHostDelegate and it seems like it maily uses ResourceContext to get ProfileIOData ...
8 years, 3 months ago (2012-08-30 23:10:01 UTC) #5
awong
I'm looking through ChromeResourceDispatcherHostDelegate and it seems like it maily uses ResourceContext to get ProfileIOData ...
8 years, 3 months ago (2012-08-30 23:10:01 UTC) #6
michaeln
See OfflineResourceThrottle which is created by ResourceDispatcherHostDelegate.
8 years, 3 months ago (2012-08-30 23:14:01 UTC) #7
michaeln
> we're trying to define some way to identify a storage partition on the IO ...
8 years, 3 months ago (2012-08-30 23:16:27 UTC) #8
awong
crap. What about holding a reference to the AppCacheService off the RWH? Then the OfflineResourceThrottle ...
8 years, 3 months ago (2012-08-30 23:25:57 UTC) #9
awong
crap. What about holding a reference to the AppCacheService off the RWH? Then the OfflineResourceThrottle ...
8 years, 3 months ago (2012-08-30 23:25:57 UTC) #10
awong
On Thu, Aug 30, 2012 at 4:16 PM, <michaeln@chromium.org> wrote: > we're trying to define ...
8 years, 3 months ago (2012-08-30 23:31:28 UTC) #11
awong
On Thu, Aug 30, 2012 at 4:16 PM, <michaeln@chromium.org> wrote: > we're trying to define ...
8 years, 3 months ago (2012-08-30 23:31:28 UTC) #12
awong
Hey Michael, What do you think about only exposing AppCache rather than the whole StoragePartition? ...
8 years, 3 months ago (2012-09-06 00:24:26 UTC) #13
michaeln
I've been noodling on this some too. I think we may be able to make ...
8 years, 3 months ago (2012-09-06 01:13:11 UTC) #14
michaeln
Hi Albert, i've updated the other CL to hide the fact that StoragePartition is refcounted ...
8 years, 3 months ago (2012-09-06 20:36:50 UTC) #15
awong
Okay, here's a preview. I still need to add an Equals() function, and probably promote ...
8 years, 3 months ago (2012-09-07 01:54:09 UTC) #16
michaeln
On 2012/09/07 01:54:09, awong wrote: > Okay, here's a preview. > > I still need ...
8 years, 3 months ago (2012-09-07 20:21:01 UTC) #17
awong
On 2012/09/07 20:21:01, michaeln wrote: > On 2012/09/07 01:54:09, awong wrote: > > Okay, here's ...
8 years, 3 months ago (2012-09-08 01:22:15 UTC) #18
awong
ready for a real review.
8 years, 3 months ago (2012-09-11 00:50:26 UTC) #19
michaeln
LGTM http://codereview.chromium.org/10885044/diff/29001/content/browser/worker_host/worker_storage_partition.h File content/browser/worker_host/worker_storage_partition.h (right): http://codereview.chromium.org/10885044/diff/29001/content/browser/worker_host/worker_storage_partition.h#newcode49 content/browser/worker_host/worker_storage_partition.h:49: ChromeAppCacheService* appcache_service() { return appcache_service_.get(); } I think ...
8 years, 3 months ago (2012-09-11 01:37:31 UTC) #20
awong
piman: owners please? https://chromiumcodereview.appspot.com/10885044/diff/29001/content/browser/worker_host/worker_storage_partition.h File content/browser/worker_host/worker_storage_partition.h (right): https://chromiumcodereview.appspot.com/10885044/diff/29001/content/browser/worker_host/worker_storage_partition.h#newcode49 content/browser/worker_host/worker_storage_partition.h:49: ChromeAppCacheService* appcache_service() { return appcache_service_.get(); } ...
8 years, 3 months ago (2012-09-11 03:15:20 UTC) #21
piman
LGTM+nit. https://chromiumcodereview.appspot.com/10885044/diff/16003/content/browser/worker_host/worker_storage_partition.h File content/browser/worker_host/worker_storage_partition.h (right): https://chromiumcodereview.appspot.com/10885044/diff/16003/content/browser/worker_host/worker_storage_partition.h#newcode24 content/browser/worker_host/worker_storage_partition.h:24: // Worker APIs that run on teh IO ...
8 years, 3 months ago (2012-09-11 03:27:01 UTC) #22
awong
On 2012/09/11 03:27:01, piman wrote: > LGTM+nit. > > https://chromiumcodereview.appspot.com/10885044/diff/16003/content/browser/worker_host/worker_storage_partition.h > File content/browser/worker_host/worker_storage_partition.h (right): > ...
8 years, 3 months ago (2012-09-11 18:36:16 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ajwong@chromium.org/10885044/29004
8 years, 3 months ago (2012-09-11 18:36:34 UTC) #24
commit-bot: I haz the power
8 years, 3 months ago (2012-09-11 21:41:02 UTC) #25
Change committed as 156126

Powered by Google App Engine
This is Rietveld 408576698