Fix clearing of code caches to work with network service

Http caches are owned by network service when network service is enabled
otherwise they are owned by browser thread. HttpCaches are cleared by
StoragePartitionHttpDataRemover on browser thread when network service
is not enabled. However, with network service enabled they are cleared by
a different mechanism by the network service.

GeneratedCodeCaches are owned by the browser process and clearing them
should be cleared by the browser process. Hence clearing the
GeneratedCodeCache along with HttpCaches in StoragePartitionDataRemover
doesn't work. This cl refactors the clearing of code caches into a separate
class, so it can be used both with and without network service.

Bug: chromium:892652
Change-Id: I5238de412f35f3dc90ae69c37b76e83d34a0d089
Reviewed-on: https://chromium-review.googlesource.com/c/1270946
Reviewed-by: Fady Samuel <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Victor Costan <[email protected]>
Reviewed-by: Maks Orlovich <[email protected]>
Commit-Queue: Mythri Alle <[email protected]>
Cr-Commit-Position: refs/heads/master@{#601897}
15 files changed