0
Commit Graph

205 Commits

Author SHA1 Message Date
Marijn Kruisselbrink
8ffda44d4b [FileAPI] Change BlobUrlRegistry to be per storage partition.
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}
2020-09-03 18:29:47 +00:00
Adrienne Walker
d701f47939 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.

This is a relanding of:
https://chromium-review.googlesource.com/c/chromium/src/+/2343588

Bug: 1081897
Change-Id: I14498094d0262c2806eb66ca3cfde85956d59d17
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2357071
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Auto-Submit: enne <enne@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799952}
2020-08-20 02:15:11 +00:00
Wez
d223c2a70c Revert "appcache: delete appcache directory from profile when disabled"
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}
2020-08-12 13:22:03 +00:00
Adrienne Walker
bd17f19837 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}
2020-08-11 19:20:48 +00:00
Adrienne Walker
840d717a82 appcache: don't create service when its feature is disabled
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}
2020-08-11 05:55:57 +00:00
Lei Zhang
746ce47465 Rename base::DeleteFileRecursively() to DeletePathRecursively().
Take the name suggestion from several reviewers while converting
base::DeleteFile(path, true) calls.

Tbr: blundell@chromium.org,jamiewalch@chromium.org,jkarlin@chromium.org,kinuko@chromium.org,reillyg@chromium.org,sdefresne@chromium.org,xdai@chromium.org
Bug: 1009837
Change-Id: Ie0a3bbe7bae4844f4f29a4ffd63fd032128e599d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2274676
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#784327}
2020-07-01 04:39:45 +00:00
Bret Sepulveda
566521534d Reland "Add StoragePartitionConfig class."
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}
2020-06-24 14:47:13 +00:00
Bret Sepulveda
e16ff9f100 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}
2020-06-24 10:48:36 +00:00
Aaron Colwell
225f6f4c82 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}
2020-06-24 03:51:52 +00:00
Lei Zhang
3190449f77 Add base::GetDeletePathRecursivelyCallback().
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}
2020-06-12 05:14:04 +00:00
Gabriel Charette
e7cdc5cd07 [BrowserThread] Migration callers without full content:: namespace
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 ).

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}
2020-05-27 23:35:05 +00:00
Gabriel Charette
9fb704a00b Mass-migrate users of base::ThreadPool() as a trait to base::ThreadPool:: API [content/]
Split content/ from https://chromium-review.googlesource.com/c/chromium/src/+/2026350
as it had trouble landing in one go.

The following script was used to generate this CL (run on every C++
file in the codebase; processing .h before matching .cc/.mm):
https://bugs.chromium.org/p/chromium/issues/detail?id=1026641#c22
(intentionally ignores cleaning post_task.h for now).

TBR=fdoray@chromium.org, tsepez@chromium.org

Bug: 1026641
Change-Id: I27c51f5648ea518122b90fde09f09b19afd07972
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2074918
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#744669}
2020-02-26 16:10:21 +00:00
danakj
151f8fdd0c Convert Callbacks to {Once,Repeating}Callback in content/browser/
Use OnceCallback where possible because the callback is only used once
and RepeatingCallback and BindRepeating otherwise.

Pass RepeatingCallback ownership by value instead of const ref.

R=avi@chromium.org

Bug: 1007760
Change-Id: I18ea04793d877ab91733dc3ecba363c2509ea68a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1961134
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Auto-Submit: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#723678}
2019-12-11 03:11:14 +00:00
danakj
6a28d7d586 Convert base::Bind to base::Bind{Once,Repeating} in content/public/.
Use OnceCallback where possible, otherwise rename to RepeatingCallback
and BindRepeating.

R=avi@chromium.org

Bug: 1007763
Change-Id: I06c210dafc3066d4b26da90e484d3099dcf28b4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1958891
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#723401}
2019-12-10 18:56:29 +00:00
Aaron Colwell
dd0ae764d5 Replace site URL with partition_domain in BrowserContext::AsyncObliterateStoragePartition()
This change simply removes the need to wrap the extension ID in a site URL and then
immediately extract it to delete the partition. The partition_domain is always the
extension ID so I'm just making that fact explicit.

Bug: None
Change-Id: Ie138d70a3489d6bbdf927190ebb811664c47d398
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1947813
Commit-Queue: Aaron Colwell <acolwell@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Auto-Submit: Aaron Colwell <acolwell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#722246}
2019-12-05 22:24:57 +00:00
Lei Zhang
eaaabcf79a Use base::DeleteFileRecursively() in 3 top-level dirs.
Make it more obvious "rm -rf" is happening, for content/, extensions/,
and storage/.

Bug: 1009837
Change-Id: Ia96e4a4149eb4389ba337d239a3c1be115f0f6e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1952195
Commit-Queue: Victor Costan <pwnall@chromium.org>
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#722084}
2019-12-05 17:29:09 +00:00
DongJun Kim
47743f4fbd Rename content/browser/fileapi to file_system
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}
2019-10-28 03:05:51 +00:00
Hans Wennborg
5ffd1393b3 Include bloat: reduce number of includes in content_browser_client.h
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}
2019-10-16 11:00:02 +00:00
Matt Falkenhagen
41ccef450c Background Fetch: Prepare for service worker UI thread core.
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}
2019-08-28 14:19:02 +00:00
Matt Falkenhagen
fc796d6dc1 service worker: Move ServiceWorkerOnUI flag helpers to public API.
Code in //chrome etc will need to use these.

Bug: 824858
Change-Id: I17942f3050aab63ef35f567f7cc610c52a02baa1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1763524
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689392}
2019-08-22 09:01:26 +00:00
Matt Falkenhagen
2f7314ab8d service worker: Ban ResourceContext when ServiceWorkerOnUI is enabled.
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}
2019-08-21 10:18:22 +00:00
Pavol Marko
d593774370 Reland "Allow querying StoragePartition path during NetworkContext creation"
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}
2019-08-11 23:08:34 +00:00
Scott Little
8d27ccc8c2 Revert "Allow querying StoragePartition path during NetworkContext creation"
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}
2019-08-09 16:52:29 +00:00
Pavol Marko
8f0166a59b 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}
2019-08-09 15:55:53 +00:00
Kinuko Yasuda
abbb92a807 Remove BlobURLRequestJob
Bug: 934009, 985682
Change-Id: Id1767bd1df5833ab3bff966edca8f0c2158c3348
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1732701
Commit-Queue: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#685094}
2019-08-08 05:34:01 +00:00
Clark DuVall
a1220f7b84 Remove usages of NavigationLoaderOnUI in content/
Also removes the kNavigationLoaderOnUI feature. We can do more cleanup
of the throttles/interceptors in separate CLs.

chrome/ usages removed in http://crrev.com/c/1731919

Bug: 824840
Change-Id: I1038900a4f97449ceab152df24c49f0719a195d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1732409
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683688}
2019-08-02 19:00:57 +00:00
Sami Kyostila
8e4d5a915e content/browser: Always specify thread affinity when posting tasks
*** 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}
2019-08-02 12:45:05 +00:00
John Abd-El-Malek
346c99158a Remove ResourceRequestInfo.
Bug: 934009
Change-Id: I1bf1b1bd6e86bc32aa49c3ea7e5a37b6a53fc580
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1728266
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682907}
2019-07-31 20:48:58 +00:00
Kinuko Yasuda
2a3b1d535d Remove non-NetworkService code in Web Packaging
Bug: 934009
Change-Id: I338f7e288d1767bfe221f947bdf76e34b4250ba7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1723400
Commit-Queue: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682623}
2019-07-31 07:59:54 +00:00
John Abd-El-Malek
cfb5753f59 Remove now unused URLRequestInterceptors and ProtocolHandlers in content/.
Bug: 934009
Change-Id: If920729eb07031ec85b06d426ad40792d866608c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1726655
Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682489}
2019-07-30 22:30:11 +00:00
John Abd-El-Malek
1d780d4d30 Remove content::BrowserContext methods to create a URLRequestContext.
Bug: 934009
Change-Id: I0994c106955ba9961cfed1fa2814bd4b7745fd3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1724507
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682374}
2019-07-30 18:41:02 +00:00
Clark DuVall
ab63d14633 Support signed exchange interceptors on UI thread
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}
2019-07-23 04:24:36 +00:00
Rayan Kanso
e147def8da [ContentIndex] Add query methods to ContentIndexContext.
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}
2019-07-22 09:56:35 +00:00
Rayan Kanso
a42c3caf02 [ContentIndex] Create a public ContentIndexContext.
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}
2019-07-19 17:21:20 +00:00
Clark DuVall
5690e740dc Support appcache running on the UI thread
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}
2019-07-17 18:26:17 +00:00
Rayan Kanso
d33e277141 [ContentIndex] Create a Content Index Context.
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}
2019-06-27 16:52:41 +00:00
John Abd-El-Malek
5cebe594ec Remove the BrowserContext methods to create URLRequestContexts for main/media partitions when a partition_domain is specified.
This code was only used by src/chrome when network service is disabled.

Bug: 934009
Change-Id: I1200ac9e5314de8cdbb9f05e820dbde9c91b6202
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1655087
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#668594}
2019-06-12 22:37:46 +00:00
John Abd-El-Malek
96aa8d5450 Ensure that ChromeBlobStorageContext::context() is called on the IO thread.
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}
2019-06-03 18:52:03 +00:00
John Abd-El-Malek
8d5d3a3dec Remove the streams code as it's no longer used.
Bug: 934009
Change-Id: Idcf36e666b12cb0029f6c341c868ccf4e4cba450
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1639597
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Sam McNally <sammc@chromium.org>
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665444}
2019-06-03 02:38:49 +00:00
Ben Kelly
ef7fc18267 CacheStorage: Bind mojo interfaces on target TaskRunner.
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}
2019-05-23 20:05:35 +00:00
Tsuyoshi Horo
242ee8f02d Introduce PrefetchedSignedExchangeCache
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}
2019-04-26 06:37:07 +00:00
Nate Fischer
86c01ed2ca AW: don't use URLRequestContextGetter
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}
2019-03-18 21:27:15 +00:00
Matt Falkenhagen
081a5524ad service worker: Remove URLRequest interceptor.
No longer needed following the launch of S13nServiceWorker.

Bug: 926114
Change-Id: Icf911a0d6f498bf72327a2392e0e6f286fdcf029
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1510616
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638934}
2019-03-08 07:19:09 +00:00
Sebastien Marchand
17fa278ba1 Include base/bind_helpers.h in the files that use it.
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}
2019-01-25 19:28:10 +00:00
Robbie McElrath
fe595425bc Comment ListenToCookieChanges call in StoragePartitionImplMap::Get.
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}
2019-01-16 08:24:57 +00:00
Takuto Ikuta
8332bf9da1 Replace base::hash_set with std::unordered_set
base::hash_set is alias of std::unordered_set now.

I applied following command to make this CL.

$ git grep -l 'base::hash_set' | fgrep -v base/ | xargs sed -i -e 's/base::hash_set/std::unordered_set/g' -e 's/\(#include <[a-z_]*>\)/\1\n#include <unordered_set>/' -e 's/BASE_HASH_NAMESPACE/std/'
$ git cl format

TBR: dcheng@chromium.org
Bug: 576864
Change-Id: I89535173626483c06989b4d8a99dc46c1d49ce7b
Reviewed-on: https://chromium-review.googlesource.com/c/1390887
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620168}
2019-01-05 03:58:00 +00:00
Andrey Kosyakov
4c806b8b80 DevTools: enable only one DevToolsURLRequestInterceptor per BrowserContext
Bug: 811385,764505
Change-Id: I924aa64f71b2012f21ce0dc7e309cf354bbeb6e4
Reviewed-on: https://chromium-review.googlesource.com/c/1391678
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619186}
2018-12-28 20:17:50 +00:00
John Abd-El-Malek
9a3224eb72 Reland "Stop creating net::URLRequestContext in the browser process when network service is enabled."
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}
2018-12-14 21:17:52 +00:00
Clark DuVall
ebc1d4a86e Revert "Stop creating net::URLRequestContext in the browser process when network service is enabled."
This reverts commit 2864f69f22.

Reason for revert: http://crbug.com/914724

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}

TBR=jam@chromium.org,mmenke@chromium.org

Change-Id: I6506e560dea13058d0336e22c3fc4844ac57fa04
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 837753, 914724
Reviewed-on: https://chromium-review.googlesource.com/c/1376101
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616349}
2018-12-13 17:27:35 +00:00
John Abd-El-Malek
2864f69f22 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}
2018-12-12 19:27:17 +00:00