Different storage partitions should not be able to resolve blob URLs
created in other partitions. To ensure this, give each partition their
own blob url registry.
There is one exception though, a <webview> inside a chrome app should
be able to resolve blob URLs that were created by the chrome app. To
enable this, we add the concept of a "fallback url registry" to
BlobUrlRegistry, and pass the BlobUrlRegistry of the app in as fallback
when creating the storage partition for a <webview>.
Bug: 1106890
Change-Id: I809f24a2c0b4d8d21e53d46bb6d3e2027b21281b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2324110
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Aaron Colwell <acolwell@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#804321}
This reverts commit bd17f19837.
Reason for revert: Test is flaky, especially on Fuchsia bots.
Original change's description:
> appcache: delete appcache directory from profile when disabled
>
> Once AppCache has been removed from Chrome, sites will have no way of
> cleaning up user data in local profiles. To fix this, when a storage
> partition is accessed when AppCache has been disabled, we will delete
> the AppCache directory from that profile directory.
>
> Bug: 1081897
> Change-Id: Iea404f7c83595ba1397fab4a5d3f97d1e3280916
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343588
> Commit-Queue: enne <enne@chromium.org>
> Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#796938}
TBR=kinuko@chromium.org,mek@chromium.org,enne@chromium.org
Change-Id: Ic43fce0f9ad605a7bfb3a291a320e45d8c329b9d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1081897, 1115296
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2351834
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797219}
Once AppCache has been removed from Chrome, sites will have no way of
cleaning up user data in local profiles. To fix this, when a storage
partition is accessed when AppCache has been disabled, we will delete
the AppCache directory from that profile directory.
Bug: 1081897
Change-Id: Iea404f7c83595ba1397fab4a5d3f97d1e3280916
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343588
Commit-Queue: enne <enne@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796938}
Currently, disabling AppCache by turning off blink::features::kAppCache
is a shallow disabling, in that the web api and the loader no longer use
it, and its preference is disabled, but the service is still created.
This is a step towards adding data deletion behavior when this feature
is disabled. It doesn't make sense to delete the data folder when there
is still an appcache service that exists at runtime.
This patch makes the AppCache service optional and does not create it
when the kAppCache feature is disabled.
Bug: 1081897
Change-Id: I3a2a6cf4dd5bb8654a3c0da9ce310acff91766eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339920
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Auto-Submit: enne <enne@chromium.org>
Commit-Queue: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796715}
This reverts commit e16ff9f100.
Reason for revert: Bot was still red after revert: https://ci.chromium.org/p/chromium/builders/ci/WebKit%20Linux%20Leak/15944
Original change's description:
> Revert "Add StoragePartitionConfig class."
>
> This reverts commit 225f6f4c82.
>
> Reason for revert: I think this is causing failures in:
> virtual/omt-worker-fetch/external/wpt/workers/modules/dedicated-worker-import.any.worker.html
> http/tests/workers/worker-usecounter.html
> virtual/omt-worker-fetch/http/tests/workers/worker-usecounter.html
> and the "webkit_lint" step.
> See example failure: https://ci.chromium.org/p/chromium/builders/ci/Win10%20Tests%20x64/47132
>
> Original change's description:
> > Add StoragePartitionConfig class.
> >
> > Introducing StoragePartitionConfig to make it easier for code to
> > directly request the StoragePartition they need instead of having to
> > go through the indirection of site URLs. Grouping the 3 attributes of
> > a config into a class also makes several call sites simpler. This is
> > being done as part of an effort to reduce the amount of code that
> > depends on site URLs.
> >
> > - Created class for storing the storage partition
> > <domain, name, in_memory> tuple.
> > - Update GetStoragePartitionConfigForSite() and related code to use
> > this new class.
> > - Create BrowserContest::GetStoragePartition() method that takes
> > StoragePartitionConfig as a parameter so future callers do not need
> > to construct a site URL to get a storage partition.
> > - Remove StoragePartitionImplMap::StoragePartitionConfig struct and
> > convert StoragePartitionImplMap to use the new StoragePartitionConfig
> > class.
> >
> > Bug: 1085275
> > Change-Id: I6679ee79ce88cf7cbfdfeb2686452d0cfcc1a9c3
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2253240
> > Commit-Queue: Aaron Colwell <acolwell@chromium.org>
> > Reviewed-by: Aaron Colwell <acolwell@chromium.org>
> > Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
> > Reviewed-by: James MacLean <wjmaclean@chromium.org>
> > Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
> > Auto-Submit: Aaron Colwell <acolwell@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#781691}
>
> TBR=acolwell@chromium.org,alexmos@chromium.org,karandeepb@chromium.org,wjmaclean@chromium.org
>
> Change-Id: Iec47df87cb66a779d2d569e825c9b4ecccf1f2ef
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1085275
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2263216
> Reviewed-by: Bret Sepulveda <bsep@chromium.org>
> Commit-Queue: Bret Sepulveda <bsep@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#781798}
TBR=acolwell@chromium.org,alexmos@chromium.org,bsep@chromium.org,karandeepb@chromium.org,wjmaclean@chromium.org
# Not skipping CQ checks because this is a reland.
Bug: 1085275
Change-Id: I6eaf4a96de9e08f93e450f708cf6eea5c33ec5b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2264292
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781864}
This reverts commit 225f6f4c82.
Reason for revert: I think this is causing failures in:
virtual/omt-worker-fetch/external/wpt/workers/modules/dedicated-worker-import.any.worker.html
http/tests/workers/worker-usecounter.html
virtual/omt-worker-fetch/http/tests/workers/worker-usecounter.html
and the "webkit_lint" step.
See example failure: https://ci.chromium.org/p/chromium/builders/ci/Win10%20Tests%20x64/47132
Original change's description:
> Add StoragePartitionConfig class.
>
> Introducing StoragePartitionConfig to make it easier for code to
> directly request the StoragePartition they need instead of having to
> go through the indirection of site URLs. Grouping the 3 attributes of
> a config into a class also makes several call sites simpler. This is
> being done as part of an effort to reduce the amount of code that
> depends on site URLs.
>
> - Created class for storing the storage partition
> <domain, name, in_memory> tuple.
> - Update GetStoragePartitionConfigForSite() and related code to use
> this new class.
> - Create BrowserContest::GetStoragePartition() method that takes
> StoragePartitionConfig as a parameter so future callers do not need
> to construct a site URL to get a storage partition.
> - Remove StoragePartitionImplMap::StoragePartitionConfig struct and
> convert StoragePartitionImplMap to use the new StoragePartitionConfig
> class.
>
> Bug: 1085275
> Change-Id: I6679ee79ce88cf7cbfdfeb2686452d0cfcc1a9c3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2253240
> Commit-Queue: Aaron Colwell <acolwell@chromium.org>
> Reviewed-by: Aaron Colwell <acolwell@chromium.org>
> Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
> Reviewed-by: James MacLean <wjmaclean@chromium.org>
> Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
> Auto-Submit: Aaron Colwell <acolwell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#781691}
TBR=acolwell@chromium.org,alexmos@chromium.org,karandeepb@chromium.org,wjmaclean@chromium.org
Change-Id: Iec47df87cb66a779d2d569e825c9b4ecccf1f2ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1085275
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2263216
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781798}
Introducing StoragePartitionConfig to make it easier for code to
directly request the StoragePartition they need instead of having to
go through the indirection of site URLs. Grouping the 3 attributes of
a config into a class also makes several call sites simpler. This is
being done as part of an effort to reduce the amount of code that
depends on site URLs.
- Created class for storing the storage partition
<domain, name, in_memory> tuple.
- Update GetStoragePartitionConfigForSite() and related code to use
this new class.
- Create BrowserContest::GetStoragePartition() method that takes
StoragePartitionConfig as a parameter so future callers do not need
to construct a site URL to get a storage partition.
- Remove StoragePartitionImplMap::StoragePartitionConfig struct and
convert StoragePartitionImplMap to use the new StoragePartitionConfig
class.
Bug: 1085275
Change-Id: I6679ee79ce88cf7cbfdfeb2686452d0cfcc1a9c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2253240
Commit-Queue: Aaron Colwell <acolwell@chromium.org>
Reviewed-by: Aaron Colwell <acolwell@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: James MacLean <wjmaclean@chromium.org>
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Auto-Submit: Aaron Colwell <acolwell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781691}
There exists some base::DeleteFileRecursively() callers that want to use
PostTask() APIs to delete a path on another task runner. To do so, they
currently write:
base::BindOnce(base::IgnoreResult(&base::DeleteFile), path, true)
To simply the callers, and help transition base::DeleteFile() to remove
its |recursive| boolean parameter, add
base::GetDeletePathRecursivelyCallback(). Now, callers can just write:
base::BindOnce(base::GetDeletePathRecursivelyCallback(), path)
Use base::GetDeletePathRecursivelyCallback() in chrome/ and content/,
and add a TODO note to rename base::DeleteFileRecursively() to
base::DeletePathRecursively().
Bug: 1009837
Change-Id: I9c229fa668dea13f0bf24f20eb6ce066ac1eca33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2204683
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777685}
Note to QA: This CL is purely mechanical and shouldn't be blamed
for future regressions on touched files.
This is a follow-up to https://chromium-review.googlesource.com/c/chromium/src/+/2211138
which already removed all usage using content::BrowserThread.
Hence this script now matches unqualified BrowserThread:: without
risking having "content::" be selected as "traits_before" by the regex
(ran on same revision as step #1).
content:: is now always added if outside namespace content {}
(deleting unused using content::BrowserThread; decls)
Script @ https://crbug.com/1026641#c92
(will TBR fdoray@ post-review for mechanical change)
TBR=fdoray@hchromium.org
AX-Relnotes: n/a.
Bug: 1026641
Change-Id: I51ae2f83eb17d19b54563fd9b4fc040d2aa0c948
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2212469
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772458}
In the past, "content/*/file_system" was renamed to "fileapi"
to contain both the code for the filesystem API and the blob system.
But the blob system moved out to separate directories,
we have the confusing situation that we have directories named
after one API that contain the implementation of a different API.
This patch rename "content/browser/fileapi" to "file_system"
to actually match for reducing confusion.
Bug: 921260
Change-Id: Iffb6dc2e9b453585f04642c534db324e99684737
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1873805
Commit-Queue: DongJun Kim <djmix.kim@samsung.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709789}
This reduces the number of preprocessor tokens in
content_browser_client.h from 1,335,281 to 754,474. Since this is a
widely included file, reducing build times a fair bit (see bug).
TBR=tsepez for content/browser/child_process_security_policy_*
Bug: 1014009
Change-Id: Id3c2de29f5b08cab80820d01aff722afeb1618e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1857126
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706388}
The thread ServiceWorkerContextCore lives on (the "core thread") will
move from the IO thread to the UI thread when the ServiceWorkerOnUI
feature is enabled.
This CL makes background_fetch aware of the core thread instead of
assuming the IO thread. This makes external/wpt/background-fetch web
tests and related browser_tests pass when the feature is enabled.
The conversion is fairly straightforward but some IO thread work is
still required because blob building must be on the IO thread.
Change-Id: I19aa33b12dec85498bc741d934a1f803bbf89474
Bug: 824858
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1771488
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Rayan Kanso <rayankans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691148}
Some tests were still failing on the check in the destructor that
resource_context_ is nullptr. This clearly avoids using resource_context_
at all.
Bug: 824858
Change-Id: I03346c6400fbdb5067c19a0ba6b7480d5183881f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1763348
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#688937}
This is a reland of 8f0166a59b
No modification has been made to original CL:1735572, so TBRing.
Reason for reland without modification:
The original change was reverted due to failures in the
EnterpriseEnrollmentTest.StoragePartitionUpdated browsertest.
From local testing, it seems to have been flaky and this CL has not made
the flakiness significantly worse.
In the meantime, I've submitted CL:1746181 to make the test not flaky.
TBR=jam@chromium.org
Original change's description:
> Allow querying StoragePartition path during NetworkContext creation
>
> When creating a NetworkCon NetworkContext for a StoragePartition, ensure
> that the StoragePartition is already in the StoragePartitionImplMap and
> its GetPath member can be called.
>
> This requires changing from the sequence:
> (1) StoragePartitionImpl::Create <-- also creates NetworkContext
> (2) put into StoragePartitionImpl map
> to the sequence:
> (1) StoragePartitionImpl::Create <-- does not create NetworkContext
> (2) put into StoragePartitionImpl map
> (3) StoragePartitionImpl::Initialize <-- creates NetworkContext
>
> DCHECKs guard that no other functions except for GetPath() and
> browser_context() are called until StoragePartitionImpl::Initialize has
> returned.
>
> Bug: 939344
> Test: All tests still pass
> Change-Id: Ib5fdd5dae6c53e773ac5ba4575c671b1ad3595cc
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1735572
> Commit-Queue: Pavol Marko <pmarko@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#685582}
Bug: 939344
Change-Id: Id7e0988051805ae5640211b422755ce3485beab4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1746182
Reviewed-by: Pavol Marko <pmarko@chromium.org>
Commit-Queue: Pavol Marko <pmarko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#685900}
This reverts commit 8f0166a59b.
Reason for revert: Broke the linux-chromeos-rel build.
https://ci.chromium.org/p/chromium/builders/ci/linux-chromeos-rel/27984
Original change's description:
> Allow querying StoragePartition path during NetworkContext creation
>
> When creating a NetworkCon NetworkContext for a StoragePartition, ensure
> that the StoragePartition is already in the StoragePartitionImplMap and
> its GetPath member can be called.
>
> This requires changing from the sequence:
> (1) StoragePartitionImpl::Create <-- also creates NetworkContext
> (2) put into StoragePartitionImpl map
> to the sequence:
> (1) StoragePartitionImpl::Create <-- does not create NetworkContext
> (2) put into StoragePartitionImpl map
> (3) StoragePartitionImpl::Initialize <-- creates NetworkContext
>
> DCHECKs guard that no other functions except for GetPath() and
> browser_context() are called until StoragePartitionImpl::Initialize has
> returned.
>
> Bug: 939344
> Test: All tests still pass
> Change-Id: Ib5fdd5dae6c53e773ac5ba4575c671b1ad3595cc
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1735572
> Commit-Queue: Pavol Marko <pmarko@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#685582}
TBR=jam@chromium.org,pmarko@chromium.org
Change-Id: I03ba8a10a741cf4d90e1614b0ff8f7ce48ba1fd2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 939344
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1746551
Reviewed-by: Scott Little <sclittle@chromium.org>
Commit-Queue: Scott Little <sclittle@chromium.org>
Cr-Commit-Position: refs/heads/master@{#685603}
When creating a NetworkCon NetworkContext for a StoragePartition, ensure
that the StoragePartition is already in the StoragePartitionImplMap and
its GetPath member can be called.
This requires changing from the sequence:
(1) StoragePartitionImpl::Create <-- also creates NetworkContext
(2) put into StoragePartitionImpl map
to the sequence:
(1) StoragePartitionImpl::Create <-- does not create NetworkContext
(2) put into StoragePartitionImpl map
(3) StoragePartitionImpl::Initialize <-- creates NetworkContext
DCHECKs guard that no other functions except for GetPath() and
browser_context() are called until StoragePartitionImpl::Initialize has
returned.
Bug: 939344
Test: All tests still pass
Change-Id: Ib5fdd5dae6c53e773ac5ba4575c671b1ad3595cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1735572
Commit-Queue: Pavol Marko <pmarko@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#685582}
*** Note: There is no behavior change from this patch. ***
The PostTask APIs will shortly be changed to require all tasks to explicitly
specify their thread affinity, i.e., whether the task should run on the thread
pool or a specific named thread such as a BrowserThread. This patch updates all
call sites with thread affinity annotation. We also remove the "WithTraits"
suffix to make the call sites more readable.
Before:
// Thread pool task.
base::PostTaskWithTraits(FROM_HERE, {...}, ...);
// UI thread task.
base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI, ...}, ...);
After:
// Thread pool task.
base::PostTask(FROM_HERE, {base::ThreadPool(), ...}, ...);
// UI thread task.
base::PostTask(FROM_HERE, {BrowserThread::UI, ...}, ...);
This patch was semi-automatically prepared with these steps:
1. Patch in https://chromium-review.googlesource.com/c/chromium/src/+/1635827
to make thread affinity a build-time requirement.
2. Run an initial pass with a clang rewriter:
https://chromium-review.googlesource.com/c/chromium/src/+/1635623
3. ninja -C out/Debug | grep 'requested here' | cut -d: -f1-3 | sort | \
uniq > errors.txt
4. while read line; do
f=$(echo $line | cut -d: -f 1)
r=$(echo $line | cut -d: -f 2)
c=$(echo $line | cut -d: -f 3)
sed -i "${r}s/./&base::ThreadPool(),/$c" $f
done < errors.txt
5. GOTO 3 until build succeeds.
6. Remove the "WithTraits" suffix from task API call sites:
$ tools/git/mffr.py -i <(cat <<EOF
[
["PostTaskWithTraits", "PostTask"],
["PostDelayedTaskWithTraits", "PostDelayedTask"],
["PostTaskWithTraitsAndReply", "PostTaskAndReply"],
["CreateTaskRunnerWithTraits", "CreateTaskRunner"],
["CreateSequencedTaskRunnerWithTraits", "CreateSequencedTaskRunner"],
["CreateUpdateableSequencedTaskRunnerWithTraits", "CreateUpdateableSequencedTaskRunner"],
["CreateSingleThreadTaskRunnerWithTraits", "CreateSingleThreadTaskRunner"],
["CreateCOMSTATaskRunnerWithTraits", "CreateCOMSTATaskRunner"]
]
EOF
)
This CL was uploaded by git cl split.
R=boliu@chromium.org, tsepez@chromium.org
Bug: 968047
Change-Id: I346372d16a3856186ea74d14e0dd8a12f7cacae5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1729589
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Auto-Submit: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683554}
We are in the process of migrating NavigationURLLoaderImpl to the UI
thread. This CL allows the SignedExchangeRequestHandler and
PrefetchedNavigationLoaderInterceptor to be used on the UI thread
when the NavigationLoaderOnUI feature is enabled.
The main difficulty here was dealing with reading blobs, since blobs
still live on the IO thread. Those changes are mostly concentrated in
CrossOriginReadBlockingChecker and
PrefetchedSignedExchangeCacheAdapter.
Bug: 824854
Change-Id: Iaed622313bfb7a8d00c34a2e18382d7c3c5b7457
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1707249
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#679870}
Add the virtual functions needed by the //content embedder to get the
Content Index entries and implement them.
Remove the intialization calls that notified the embedder of the
available content on start up
Bug: 973844
Change-Id: I74463f3270ea75c4846a72d6f215a5a00aa85c12
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1710646
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Richard Knoll <knollr@chromium.org>
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#679499}
This CL is the first step to stop storing entries in memory.
Instead of passing a client content to the provider, the context is made
a public so that it can be accessed from the StoragePartition. This way
the ProviderImpl can query via the context that's owned by the
StoragePartition.
As a result, the origin needs to be embedded in the Entry ID, so that
the Profile can find the appropriate context to use.
Bug: 973844
Change-Id: I55be2739ad71e3440adc4e7ace5b1b4843ee5d91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1706408
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Richard Knoll <knollr@chromium.org>
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#679166}
We are in the process of migrating NavigationURLLoaderImpl to the UI
thread. Since AppCache is implemented as a NavigationLoaderInterceptor,
it must be able to support running on the UI thread. This CL allows
AppCache to be used on the UI thread when the NavigationLoaderOnUI
feature is enabled.
Bug: 824856
Change-Id: I0be1102bc0bda3a4757171756d6f7c8c6ceb2417
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1702983
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678377}
Create a context class tied to the storage partition. The database needs
to be available on browser start-up so the content can be provided to
the browser.
Bug: 973844
Change-Id: I4174a92472a977808b7ccc8bcb09e45d8d813140
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1678500
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Richard Knoll <knollr@chromium.org>
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672939}
This regressed in r665444. Also don't execute code not needed when network service is enabled.
Bug: 934009
Change-Id: I0720f72a4ce93a7b3d7bc92d61cafa6dcd5bf4a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1639349
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665613}
In order to support moving CacheStorage off of the IO thread this CL
does the following:
* Makes CacheStorageDispatcherHost an internal detail of the
CacheStorageContextImpl. The RenderProcessHostImpl now sends
binding requests through the context.
* The CacheStorageDispatcherHost becomes a SequencedBound<> object
on the target SequencedTaskRunner.
* As a consequence all the mojo interfaces are also bound on the
target SequencedTaskRunner.
* Some of the CacheStorageContextImpl initialization is also updated
to respect the target SequencedTaskRunner.
This CL does not update other context APIs (observers, cache_manager(),
etc) to use the new TaskRunner yet. Those will come in later CLs.
Bug: 960012
Change-Id: Iada6132a79952dd11b0a0ba8bfec3300d03327ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1610679
Commit-Queue: Ben Kelly <wanderview@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662777}
A PrefetchedSignedExchangeCache is attached to a RenderFrameHostImpl. This class
holds prefetched signed exchanges when SignedExchangeSubresourcePrefetch is
enabled.
Not implemented yet but the prefetched signed exchanges will be passed to the
next navigation. And the maching subresources will be loaded from the cache if
the main resource is loaded from the cache.
This CL introduces a logic to create the cache entry in PrefetchURLLoader, not
in SignedExchangePrefetchHandler. It is because SignedExchangePrefetchHandler
can't know the inner response and body of signed exchanges.
Bug: 935267
Change-Id: Ifb9bef8e4dcf94b328efb912bd689dcee55882b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1568373
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Kunihiko Sakamoto <ksakamoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#654359}
This removes content/'s and android_webview/'s dependencies on
AwURLRequestContextGetter.
This removes ContentBrowserClient::NeedURLRequestContext() since the API
only existed so WebView could continue to rely on
AwURLRequestContextGetter. After removing this (and the chrome/
override), content layer no longer requests the
URLRequestContext{Getter} from the embedder.
This removes android_webview/'s dependency on AwURLRequestContextGetter
and nulls it out. This also cleans up some code in
AwURLRequestContextGetter (as that class is now only used when the
Network Service is disabled). This adds TODOs in dependent code to
implement the Network Service path (this code was already
non-functional).
This also updates Chrome for Android code (specifically,
content_suggestions_service_factory) to stop calling
GetURLRequestContext (since we previously didn't DCHECK for Android OS).
Bug: 936735, 902658
Test: run_webview_instrumentation_test_apk \
Test: --enable-features=NetworkService,NetworkServiceInProcess
Change-Id: I5e3276d98c9b8b86aaa8bbfaa52a60a52aa42e40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1516476
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: Patrick Noland <pnoland@chromium.org>
Reviewed-by: Changwan Ryu <changwan@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641765}
This also adds it to the whitelist used in
third_party/blink/renderer/DEPS
Gab/Francois, I've used your refactoring script for this, the rule is:
matches = re.compile(r'(\n *[^/\n][^/\n]*(base::DoNothing|base::NullCallback)\b[^*])', re.DOTALL).findall(content)
if not matches:
return False
updated_content = refactor_lib.AddInclude(file_path, content, "base/bind_helpers.h")
if updated_content == content:
return False
# Write updated file
refactor_lib.WriteFile(file_path, updated_content)
TBR=gab@chromium.org
Change-Id: I33e347d3000efd43d567ecf0cc025614ff9cfeed
Reviewed-on: https://chromium-review.googlesource.com/c/1437335
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626153}
This adds a comment before the CookieStoreContext::ListenToCookieChanges
call, and renames one of its parameters to hopefully make it clearer.
If anyone else ever misreads the code the way I did, hopefully this
change will help explain things.
Change-Id: Id5256b85c179f9a16a2c5b0df18288bb3122e245
Reviewed-on: https://chromium-review.googlesource.com/c/1413890
Reviewed-by: Victor Costan <pwnall@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623156}
This is a reland of 2864f69f22
Patchset 1->2 has the fix for not attempting to create the URLRequestContext in the browser in Clank.
Original change's description:
> Stop creating net::URLRequestContext in the browser process when network service is enabled.
>
> Bug: 837753
> Change-Id: I479666949f8c552e964ab86420ef080db9010d06
> Reviewed-on: https://chromium-review.googlesource.com/c/1367088
> Commit-Queue: John Abd-El-Malek <jam@chromium.org>
> Reviewed-by: Matt Menke <mmenke@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#615995}
Bug: 837753
Change-Id: Id9429da79b53cc3dd2292affdb411cf1c055b1f3
Reviewed-on: https://chromium-review.googlesource.com/c/1376319
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616824}