To prepare for merging the two similar paths:
- ReconnectableURLLoaderFactory /
StoragePartitionImpl::GetURLLoaderFactoryForBrowserProcess()
- URLLoaderFactoryGetter /
StoragePartitionImpl::GetURLLoaderFactoryForBrowserProcessIOThread()
This CL uses CreateURLLoaderFactoryParams() in both paths.
This causes setting
`network::mojom::URLLoaderFactoryParams::url_loader_network_observer`
also in `URLLoaderFactoryGetter`.
Probably this is consistent because it is already set in
GetURLLoaderFactoryForBrowserProcess().
Bug: 346686150
Change-Id: I0f54b608387be68e22f9b283894b2274a5ffa9f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5624791
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1325898}
Suppress unsafe buffer usage on a file-by-file basis. Out of
approximately 5850 .cc and .h files only roughly 160 files fail
compilation with the unsafe buffers warning.
Suppress only, by inserting boilerplate into affected files. Do not
re-write any code to work around the issues. Properly fixing each file
will be done in follow-up CLs.
//content/ is not removed from unsafe_bufers_paths.txt file and will be
also done as a follow-up, so it makes potential reverts simpler.
Bug: 342213636
Change-Id: I4a936e63dea95a78951f7bfae6d5487708ae3c0b
AX-Relnotes: n/a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5608913
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1312393}
Chrome is considering expiring script writable storage after an extended
period of non-use (for example: no reads or writes for 400 days).
Let's record the last-accessed time in the leveldb. This will be useful
for knowing which storage is stale in the future.
Why not just add a last_accessed field to the existing struct? This
metadata may be written without any other updates to usage information.
Re-writing those fields would require an additional read before the
write.
Bug: 40281870
Change-Id: Ibe87135637023ac635d198963e2e1d374da091f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5585301
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1310279}
Chrome is considering expiring script writable storage after an extended
period of non-use (for example: no reads or writes for 400 days).
In order to consider this for local storage, we need to know not just
when it is written but when it is read. We only store the former on a
metadata key written on write time, so we will need metadata updated on
read time as well. To differentiate the proto structs, the existing one
should make more clear it's updated on write only.
Why not just add a last_accessed field to the existing struct? I'm
concerned that updating a single metadata key on both read and write
will cause unexpected race conditions. Having different structs (and
different keys) that are written to at read time and write time reduces
the chance of a race condition which results in a bad update getting
through.
Bug: 40281870
Change-Id: I48ea2d4281bcaf6bfdb0ea16be0d0015b292c557
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5582472
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1308251}
This functionality has been enabled by default for 8 milestones and we
haven't received any breakage reports, so we should remove the ability
to opt out of this behavior.
OBSOLETE_HISTOGRAM[Cookie.TruncatingCharacterInCookieString]=No longer needed since we now block truncated cookies unconditionally
Bug: 40191620
Change-Id: If041994e19b4396078cedf881fdb423894438fc4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5526688
Reviewed-by: Richard (Torne) Coles <torne@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Steven Bingler <bingler@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Andrew Williams <awillia@chromium.org>
Reviewed-by: Matt Mueller <mattm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1302545}
* Delete a little bit more dead code
(AsyncDomStorageDatabase::CopyPrefixed)
* De-duplicate leveldb options initialization and move to the
appropriate layer (DomStorageDatabase). LocalStorage and
SessionStorage classes should more or less be backing store agnostic.
They still depend on `leveldb::Status`, but that type could
easily be swapped out if needed.
Bug: none
Change-Id: I56eb3d700595b5695a2a2fafded153bc778c64f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5450521
Reviewed-by: Nathan Memmott <memmott@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1288255}
These are only for functions that need to return a reference, but have
no empty object to return. They are slower than just using the default
constructor directly, and serve no purpose in other use cases.
Bug: none
Change-Id: I9e01c19b4a818d2cfc24b2178ec56b7128a45215
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5251800
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1254514}
A new, frame-specific interestGroupAuctionEvent is added, which reports auction configuration, structure of component auctions, and names each auction (including component ones) with a unique ID.
The existing interestGroupAccessed events that take place as part of auctions now specify which auction they are part of, and provide information on bid values. Bids taking place in top-level auctions are now also reported.
Bug: 1516642
Fuchsia-Binary-Size: Size increase is unavoidable.
Change-Id: I6109f2e3d60d52421b5be445f19e5faa74ab9e3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5153907
Commit-Queue: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Russ Hamilton <behamilton@google.com>
Cr-Commit-Position: refs/heads/main@{#1249552}
1. Use a mock AttributionManager instead of a real one: The exact
data-deletion behavior for the Attribution Reporting API is already
covered by unit tests for the AttributionManagerImpl and
AttributionStorageSql unit tests. Repeating that coverage here makes
the StoragePartitionImpl unit tests brittle. All that should really
matter here is that the StoragePartitionImpl invokes the
AttributionManager::ClearData method when it's supposed to and with
the appropriate arguments. This also obviates a problem with the
vacuous ConversionsClearAllData test, which erroneously never
created a report before checking that none remained after the
ClearData call. There is precedent for using a mock for these tests
in the RemoveAggregationServiceData test in the same file.
2. Add coverage for deleting internal Attribution Reporting data, which
uses a different data-removal mask.
3. Replace "Conversions" in test names with "Attribution Reporting".
4. Remove test-setup obviated by the use of the mock AttributionManager:
Storage doesn't need to be configured to run in memory since no
database is created at all, and noise doesn't need to be disabled
since the mock manager never actually "handles" an attribution
source.
Bug: 1495741
Change-Id: Idc5897e637f88b9816e58c24e20d879245365f14
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4974542
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1214887}
This change is a follow up to https://chromium-review.googlesource.com/c/chromium/src/+/4916973,
which created a new class -- InterestGroupCachingStorage.
Use the new class in InterestManagerImpl, but keep the caching functionality gated by a new Finch feature.
In addition, a number of downstream classes had references and pointers
to StorageInterestGroup which would now point to values inside a scoped_refpr<StorageInterestGroups>. Wrap these inside a new class
StorageInterestGroups::SingleStorageInterestGroups which will ensure
proper destruction of scoped_refpr<StorageInterestGroups> and
StorageInterestGroup*(s).
Bug: 1440817
Change-Id: Id3ac4f25df5c496baae33d2bc837346b7cd75c7e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4935438
Reviewed-by: Russ Hamilton <behamilton@google.com>
Commit-Queue: Abigail Katcoff <abigailkatcoff@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1212242}
This CL removes the dead/no-op CookieAccessParams::same_party_status
member, as well as a bunch of code that becomes dead as a result. This
CL does not change any behavior, since the field that is removed is
an enum with only one variant.
There is still more dead code that can be removed (e.g. the
party_context setup, and SameParty support in CanonicalCookie), but
that will be handled in followups.
Bug: 1348588
Change-Id: I7995f7a5d74198049e2125d0105b21c458e0691b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4690406
Reviewed-by: Avi Drissman <avi@chromium.org>
Auto-Submit: Chris Fredrickson <cfredric@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1172139}
This CL added a new function `OnPrivateNetworkAccessPermissionRequired`,
to `URLLoaderNetworkServiceObserver` to trigger the private network
access permission prompt from `CorsUrlLoader` after receiving a valid
PNA preflight response.
The permission prompt is triggered only when a request created from a
secure context to a non-secure local device. `private-network-access-id` and `private-network-access-name` are required in the preflight response header to trigger the permission prompt. Otherwise the request will be
denied.
See more: https://docs.google.com/document/d/1Q18g4fZoDIYQ9IuxlZTaItgkzfiz_tCqaEAI8J3Y1WY/edit?usp=sharing
Bug: 1338439
Change-Id: I03586272cd404cc6dbceeaada09d21382760c4c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4593350
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Yifan Luo <lyf@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1160770}
This implements the Browsing Data Model DataKey structure as well as
the Get and Remove methods in a new public interface for Private
Aggregation API. This handles data relating to both budgeting and
requested reports. Integration with the BDM will be in a followup.
Bug: 1430775
Change-Id: I58faff2342dc08508c1b366a5fcd8481061e497c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4455777
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Commit-Queue: Thomas Quintanilla <tquintanilla@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1158993}
We replace the Conversions.RegisterConversionAllowed and
Conversions.RegisterImpressionAllowed metrics with the combined
source/trigger result metrics of Conversions.SourceStoredStatus2,
Conversions.CreateReportStatus7, and
Conversions.AggregatableReport.CreateReportStatus3.
We achieve this by always creating the AttributionManagerImpl, even in
incognito mode, since that class already honors incognito mode for each
registration attempt. This also allows us to remove a number of nullptr
checks and to show the dropped registrations in the internals UI.
Bug: 1427206
Change-Id: Icdd6f02c11cbec1929f226a3c4c18ac5bbd70409
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4366381
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1121639}
FOR REVIEWERS - This is a large CL, sorry about that. Please review just
the files you're an owner for. In almost all cases, the changes should
be minimal and straightforward.
There's a need to keep StorageKey and BlinkStorageKey partial sync, but
as each organically grew this has gotten lost. As we wrap up and launch
storage partitioning, we should leave this code in a good state.
This CL swaps out the origin constructor for a new static function
called CreateFirstParty. The reason for this is to ensure callsites know
that they are explicitly creating a first-party only StorageKey and
might be missing context important to partition storage. Further, if in
the future we were to want to deprecate this construction method in
prod, we would need a static function we could re-name like this
and so migrating to this style of syntax will make that easier.
This CL is part of a series:
(1) Organize public functions and map work
(2) Rename CreateFirstParty constructors
(3) Rename CreateWithNonce constructors
(4) Rename Create constructors
(5) Remove old test constructors
(6) Define opaque origin behavior
Bug: 1410254
Change-Id: I0be1305f91a454484c68d0faf4015bad3afe05ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4251237
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Steven Bingler <bingler@chromium.org>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1105850}
Ad Auction Service calls InterestGroupManagerImpl::RegisterAdAsWon for both k-anon and non-k-anon winners of the auction. We also register component ad render URLs, which were missed previously and add a UMA metric to measure how often the winner of the unenforced auction is k-anonymous (and thus the winner of the k-anonymous auction).
Bug: 1234419
Fixed: 1396068
Change-Id: I93ef4a96e6a8ebe4aff011cfd4b6778cb48a999f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4089923
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: David Black <dmblack@google.com>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Commit-Queue: Russ Hamilton <behamilton@google.com>
Cr-Commit-Position: refs/heads/main@{#1083533}
- Remove unused interest group name and update URL k-anonymity fields.
- Remove bidding_wasm_helper URL from Ad k-anonymity keys.
- Move interest group name to the end of the Ad Reporting k-anonymity
key.
Bug: 1234419
Change-Id: I004cae5f5e806b268b62a5e527d52ed7fe55b9de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4044582
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Commit-Queue: Russ Hamilton <behamilton@google.com>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1076340}
The main motivation is that this simplifies logic for transitioning to
different k-anon keys (see the child CL). By handling requests for a K-
Anon keys that are not recorded in the database we can change which keys
correspond to an ad or interest group without requiring a complicated
migration.
This also has a side effect of fixing a few crashes we were seeing where
for some reason the record was not in the k-anonymity table and should
reduce the disk usage of the k-anonymity table.
Change-Id: I7997fdbff34338b6b0a1ca906764f807ac641098
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4016806
Commit-Queue: Caleb Raitto <caraitto@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Auto-Submit: Russ Hamilton <behamilton@google.com>
Reviewed-by: Caleb Raitto <caraitto@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1072786}
This change removes the use of StorageType::kPersistent
from BrowsingDataRemover. With persistent quota deprecation[1]
we no longer need to separately support Persistent deletions
because now they are counted under StorageType::kTemporary.
Therefore this removes special logic for Persistent storage
deletions.
[1]https://crbug.com/1233525
Bug: 1353228
Change-Id: Ic7f11a5018ed1c807240812c02cc116e51ee708a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3964859
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1061623}
This final CL is just a renaming. The V2 is removed now that there is no
V1 anymore.
This CL is part of a series:
(1) Convert CacheStorageControl::GetAllStorageKeysInfo to StorageKey
(2) Convert IndexedDBControl::GetUsage to StorageKey
(3) Remove legacy StorageUsageInfo
(4) Rename StorageUsageInfoV2 to StorageUsageInfo
Bug: 1361545
Change-Id: I5670fb5a4682748019e3e802024a17574487856e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3923741
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1053756}
This CL changes `StoragePartition::ClearData` to take a
`BrowsingDataFilterBuilder` for origin/domain filtering, as well as
`StorageKeyPolicyMatcherFunction` for special policy handling. There are
no behavior changes in this CL.
A follow up CL will pass the filter builder to attribution reporting
for further handling.
Bug: 1352147
Change-Id: Iaa6c8a9b6e3aa738e3b389cb90bdb5e8b54aaec2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3827382
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Sean Topping <seantopping@chromium.org>
Reviewed-by: James Maclean <wjmaclean@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1053590}
Normally this CL and the renaming CL would be the same CL. However,
there is some production code that changes types (and not just names) so
I split this from the next step although it will require some redundant
review.
This CL is part of a series:
(1) Convert CacheStorageControl::GetAllStorageKeysInfo to StorageKey
(2) Convert IndexedDBControl::GetUsage to StorageKey
(3) Remove legacy StorageUsageInfo
(4) Rename StorageUsageInfoV2 to StorageUsageInfo
Bug: 1361545
Change-Id: I951d351cff8b7e1eca223779d496bcb66d119770
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3922118
Commit-Queue: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1052439}
Otherwise, the global setting unintentionally alters the behavior of
subsequent tests.
We also use the empty path to indicate to AttributionStorageSql to use
an in-memory DB, which is simpler and uses less memory.
This change only affects test behavior, not real browser usage, as
real usage always creates on-disk DBs.
Bug: 1366478, 1080764
Change-Id: I7e9384d99f57846a835d61a1961249581cc75d50
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3909832
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: John Delaney <johnidel@chromium.org>
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1050429}