New issue
Advanced search Search tips

Issue 838964 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 9
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 789657

Blocking:
issue 837333



Sign in to add a comment

Need to support conditional_cache_counting_helper.cc in network service

Project Member Reported by xunji...@chromium.org, May 2 2018

Issue description

Need an API to expose the size of HTTP Cache backend for components/browsing_data/content/conditional_cache_counting_helper.cc, which depends on Backend::CalculateSizeOfAllEntries() and Backend::CalculateSizeOfEntriesBetween().
 
Cc: morlovich@chromium.org
I could take this, unless someone else wants it?

I think the only hard part here is that it uses GetMediaURLRequestContext(), and there isn't a NetworkContext equivalent, and I don't know how annoyed people would be with adding one with knowledge it will go away. 

Hmm, the other annoying thing is ownership/lifetime, since I am not sure mojom::NetworkContext* would have same lifetime as URLRequestContextGetter*, like say ...in case of network service crashes... Two easy way of dealing with this would be:
1) Just parallelize for both main and media context, but that's potentially bad IO-wise
2) Remove the media context first, which would make the issue go away, but is the sort of thing that would take forever.

Blockedon: 789657
Cc: -morlovich@chromium.org
Owner: morlovich@chromium.org
Status: Assigned (was: Available)
Thanks, Maks! I don't think anyone else is looking at this. I will put it in your queue. I agree we will need to figure out what to do with media context first.
Labels: Proj-Servicification
So it's probably more work for me to figure out what exactly this is used for than to just go ahead and do this.

It's likely cosmetic, though, so tentatively not likely to be a blocker for canary, but may be a good pipeline bubble filler.
Cc: morlovich@chromium.org
 Issue 817417  has been merged into this issue.

Comment 5 by dxie@chromium.org, May 22 2018

Labels: Hotlist-KnownIssue
Mostly done with a first cut of the code, but looks like the test will be a headache, since it uses this thing:
https://cs.chromium.org/chromium/src/content/public/test/cache_test_util.h
... which is very much unworkable in the network service world, and is used by 3 tests (clear_site_data_throttle_browsertest.cc, and conditional_cache_deletion_helper_browsertest.cc being the others) --- not sure to what extent those classes are relevant in the new world.

(Which explains why the filter note claims it "passes" on Linux in the filter file)
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 6

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2

commit 040a0dd46de606e4d6a815f0d3a8d6f43d0323f2
Author: Maks Orlovich <morlovich@chromium.org>
Date: Fri Jul 06 18:28:45 2018

S13n: port conditional_cache_counting_helper.cc to NetworkService

The design is heavily inspired by that of the ClearHttpCache
implementation (which also provided solution for GetBackend memory
management headaches). The test fixture is also partly lifted from that.

Bug:  838964 
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: Ibfc8bb4e5be259414565bafc506fc3f5ed93bf10
Reviewed-on: https://chromium-review.googlesource.com/1069193
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Helen Li <xunjieli@chromium.org>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Commit-Queue: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573020}
[modify] https://crrev.com/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2/chrome/browser/browsing_data/counters/cache_counter.cc
[modify] https://crrev.com/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2/chrome/browser/browsing_data/counters/cache_counter_browsertest.cc
[modify] https://crrev.com/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2/chrome/browser/browsing_data/counters/conditional_cache_counting_helper_browsertest.cc
[modify] https://crrev.com/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2/chrome/browser/ui/webui/settings/chromeos/device_storage_handler.cc
[modify] https://crrev.com/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2/components/browsing_data/content/DEPS
[modify] https://crrev.com/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2/components/browsing_data/content/conditional_cache_counting_helper.cc
[modify] https://crrev.com/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2/components/browsing_data/content/conditional_cache_counting_helper.h
[modify] https://crrev.com/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2/services/network/BUILD.gn
[add] https://crrev.com/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2/services/network/http_cache_data_counter.cc
[add] https://crrev.com/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2/services/network/http_cache_data_counter.h
[add] https://crrev.com/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2/services/network/http_cache_data_counter_unittest.cc
[modify] https://crrev.com/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2/services/network/network_context.cc
[modify] https://crrev.com/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2/services/network/network_context.h
[modify] https://crrev.com/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2/services/network/network_context_unittest.cc
[modify] https://crrev.com/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2/services/network/public/mojom/network_context.mojom
[modify] https://crrev.com/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2/services/network/test/test_network_context.h
[modify] https://crrev.com/040a0dd46de606e4d6a815f0d3a8d6f43d0323f2/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter

Status: Fixed (was: Assigned)
Cc: msramek@chromium.org jam@chromium.org dxie@chromium.org
 Issue 894079  has been merged into this issue.

Sign in to add a comment