0
Commit Graph

308 Commits

Author SHA1 Message Date
Sandor Major
f42e6bd64c Move permissions_policy.cc-used feature flags to the Network service
Permissions Policy code is being moved to the Network service so these
flags need to move as well.

Bug: 382291442
Low-Coverage-Reason: LARGE_SCALE_REFACTOR
Change-Id: I2d6135ef1350f21e08de9053c69c762bfb1fd7ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6287505
Owners-Override: Rick Byers <rbyers@chromium.org>
Reviewed-by: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Commit-Queue: Sandor «Alex» Major <sandormajor@chromium.org>
Auto-Submit: Sandor «Alex» Major <sandormajor@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1426039}
2025-02-27 16:12:04 -08:00
Daniel Rubery
789b3704ef Integrate device bound sessions with chrome://settings/clearBrowserData
This involves adding a new storage type for sessions and calling
DeviceBoundSessionManager from
StoragePartitionImpl::DataDeletionHelper::ClearDataOnUIThread when the
new storage type is requested.

Bug: 353774427
Change-Id: I81080c9fa983e9ed68ac457dafc778681990bf35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6039183
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Commit-Queue: Daniel Rubery <drubery@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1396915}
2024-12-16 12:20:44 -08:00
amarjotgill
1f632536e2 [OBC] Add cookie scope semantics to CookieAccessResult params
This change adds CookieScopeSemantics to CookieAccessResult
and also adds GetScopeSemantics() to the cookie access delegate.

NO_IFTTT=<Adding linter to mojom>

Bug: 378827534
Change-Id: Iaf9d250fea400bd63e6714e04cdaff091127ded6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6050716
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Amarjot Gill <amarjotgill@chromium.org>
Reviewed-by: Adam Langley <agl@chromium.org>
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1392397}
2024-12-05 18:21:19 +00:00
Dylan Cutler
ef0eba18e4 Have ClearData called with StorageKey only delete matching partitioned cookies
Bug: 40849455
Change-Id: I9544b20c7666c20a4c9a712f6719c7129489817b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6006719
Commit-Queue: Dylan Cutler <dylancutler@google.com>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1381913}
2024-11-12 19:25:16 +00:00
Peter Kasting
65c747e508 Remove some unnecessary uses of base::make_span().
Largely these are simplifications of
as_bytes(make_span(...)) -> as_byte_span(...). A few are just removals
where a span is implicitly constructible.

Bug: 364987728
Change-Id: I0c29b9f0e3ecc6fcb8e8978d0e1135579578f058
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5987587
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1377942}
2024-11-04 22:30:00 +00:00
Peter Kasting
2b138f1cce Remove vector constructor for BigBuffer.
We can construct a span implicitly from this. This also changes some
callsites to not use a vector at all, when going directly to a span is
cheaper.

Bug: 364987728
Change-Id: Ib65b0149c346c71c8d2565fa6cf50bba49b5bcde
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5972456
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Ken Rockot <rockot@google.com>
Owners-Override: Ken Rockot <rockot@google.com>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/main@{#1376413}
2024-10-31 17:10:27 +00:00
Amarjot Gill
49ce37d1b1 Remove legacy NetworkIsolationKey constructor and replace instances
Bug: 365802561
Change-Id: I2ba3349a74ca2c44985c40f8f20b2d5f3a57a68b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5867791
Commit-Queue: Amarjot Gill <amarjotgill@google.com>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Andrew Williams <awillia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1357741}
2024-09-19 18:26:08 +00:00
Hiroshige Hayashizaki
9a1aeee4d8 Use CreateURLLoaderFactoryParams() in URLLoaderFactoryGetter
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}
2024-07-11 03:10:40 +00:00
Nasko Oskov
ee48dfb4fa Prepare to remove //content/ from unsafe_bufers_paths.txt
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}
2024-06-08 05:13:06 +00:00
Ari Chivukula
03d36ae312 [LocalStorage] Add Read MetaData
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}
2024-06-04 22:54:36 +00:00
Ari Chivukula
3352a25046 [LocalStorage] Update Write MetaData proto name
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}
2024-05-30 20:41:22 +00:00
Andrew Williams
b19527f6ad [Cookies] Make the "Block Truncated Cookies" behavior permanent
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}
2024-05-17 14:05:14 +00:00
Abigail Katcoff
49d808289f Protected Audience: store k-anon keys as hashed values
This change will help decrease the size of the InterestGroups database, which is largely taken up by k-anon keys (in the k-anon table and 2 associated indices).

Bug: 338035176
Change-Id: I97151b95db0257da3098accaf492bf658997f97c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5497898
Reviewed-by: Russ Hamilton <behamilton@google.com>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Abigail Katcoff <abigailkatcoff@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1295663}
2024-05-02 19:14:55 +00:00
Evan Stade
d71a0744fd LevelDB: more cleanup.
* 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}
2024-04-16 19:53:19 +00:00
Ari Chivukula
92851c3c72 [cookies] Remove defaults from CanonicalCookie::Create
There is a confusing pattern of defaults on cookie constructors, and
this is somewhat dangerous as we do not want cookies to be created in
production code without all values being explicitly set (especially as
new values are added). Tests can use the new CreateForTesting if they
want kind defaults.

Bug: 332939148
Change-Id: Id628aa619e34d7244dadaede705374ac2310da14
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5424827
Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: Denis Kuznetsov <antrim@chromium.org>
Reviewed-by: Andy Paicu <andypaicu@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: Theodore Olsauskas-Warren <sauski@google.com>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Mohammed Abdon <mohammedabdon@chromium.org>
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Max Curran <curranmax@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1284411}
2024-04-09 12:37:44 +00:00
Peter Kasting
8104ba8d59 Remove misuses of Empty{GURL,String,String16}(): content/
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}
2024-01-31 15:23:40 +00:00
Maks Orlovich
a7d97ed824 FLEDGE: extend information reported about auctions to devtools
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}
2024-01-19 21:49:46 +00:00
Arthur Sonzogni
c686e8f4fd Rename {absl => std}::optional in //content/
Automated patch, intended to be effectively a no-op.

Context:
https://groups.google.com/a/chromium.org/g/cxx/c/nBD_1LaanTc/m/ghh-ZZhWAwAJ?utm_medium=email&utm_source=footer

As of https://crrev.com/1204351, absl::optional is now a type alias for
std::optional. We should migrate toward it.

Script:
```
function replace {
  echo "Replacing $1 by $2"
  git grep -l "$1" \
    | cut -f1 -d: \
    | grep \
      -e "^content" \
    | sort \
    | uniq \
    | grep \
      -e "\.h" \
      -e "\.cc" \
      -e "\.mm" \
      -e "\.py" \
    | xargs sed -i "s/$1/$2/g"
}
replace "absl::make_optional" "std::make_optional"
replace "absl::optional" "std::optional"
replace "absl::nullopt" "std::nullopt"
replace "absl::in_place" "std::in_place"
replace "absl::in_place_t" "std::in_place_t"
replace "\"third_party\/abseil-cpp\/absl\/types\/optional.h\"" "<optional>"
git cl format
```

# Skipping unrelated "check_network_annotation" errors.
NOTRY=True

Bug: chromium:1500249
Change-Id: Icfd31a71d8faf63a2e8d5401127e7ee74cc1c413
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5185537
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1245739}
2024-01-11 08:36:37 +00:00
Helmut Januschka
f45088469e content/browser: Refactor Quit.*Deprecated() RunLoop usage
Bug: 922118
Change-Id: Ic1f7d6cfc40a9b0adb1477278f67119007da8088
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5171808
Commit-Queue: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1245654}
2024-01-11 01:54:27 +00:00
Andrew Paseltiner
ff1f5dd72c Clean up Attribution Reporting ClearData StoragePartitionImpl unit tests
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}
2023-10-25 16:04:19 +00:00
Abigail Katcoff
97f8d40d52 Protected Audiences: Use InterestGroupCachingStorage
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}
2023-10-19 17:24:14 +00:00
Andrew Williams
a1eada603b [Cookies] Add support for blocking truncated cookies
Adds the code needed to block truncated cookies behind a feature
flag (currently disabled). This also plumbs the value such that
this can be controlled by an enterprise policy.

This is part of a chain of CLs updating the cookie handling logic to
ignore truncated cookies. The following prototype CL shows all of the
planned changes in one place:
https://chromium-review.googlesource.com/c/chromium/src/+/4134025

Bug: 1233602
Change-Id: I513f5a613e9260e63bd4be2cf26ca60aa1c273f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4706696
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Andrew Williams <awillia@chromium.org>
Reviewed-by: Nick Harper <nharper@chromium.org>
Reviewed-by: Steven Bingler <bingler@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1181302}
2023-08-09 03:31:12 +00:00
Chris Fredrickson
3e8ba5a0c6 [FPS] Remove dead same_party_status member and associated dead code
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}
2023-07-19 02:59:58 +00:00
Yifan Luo
e91e9fba0a [Private Network Access] Trigger Permission Prompt
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}
2023-06-21 18:47:23 +00:00
Thomas Quintanilla
dce5ba9b85 [Browsing Data Model] Private Aggregation Data Model Implementation
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}
2023-06-16 18:49:44 +00:00
Josh Karlin
084f072c85 [SharedStorage] Fix clear site data
When browsing data is cleared for an interval, clear all origin data if
any of that origin's data was written in the window.

Bug: 1451653
Change-Id: I03c3b1de0aa40633fcbd435580324df294733cfd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4585043
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Commit-Queue: Josh Karlin <jkarlin@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1153596}
2023-06-06 00:44:17 +00:00
Jeongwoo Park
be0b0448b6 Remove source_time from StorableSource structure
Use base::Time::Now() in AttributionStorageSql::StoreSource()

Bug: 1440187
Change-Id: Id335a1317f4ed26299ec84193bf89f7282785027
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4493584
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Commit-Queue: Jeongwoo Park <skeksk91@gmail.com>
Cr-Commit-Position: refs/heads/main@{#1139878}
2023-05-05 01:13:32 +00:00
Andrew Paseltiner
31be850d90 Record attribution registrations dropped in Incognito via common metrics
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}
2023-03-24 12:50:44 +00:00
Nan Lin
ab162f2a1e Remove SourceBuilder::SetDestinationOrigin
Change-Id: I6e03e3d7b3cee5755d325dd07cfcbcc25c6008bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4307351
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1113535}
2023-03-06 20:16:53 +00:00
Ari Chivukula
c81e13e937 [StorageKey Cleanup] (2) Rename CreateFirstParty constructors
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}
2023-02-15 20:44:57 +00:00
Thomas Quintanilla
d1b3c03758 [Browsing Data Model] Report access for Attribution Reporting
Propagates the topmost ancestor of the target frame to allow the BDM to access PageSpecificContentSettings in the Chrome client whenever a source or trigger is accessed.

Bug: 1412085
Change-Id: Ifb3d711c749aac069f4ec1188ec20d88f263580b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4221460
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Mariam Ali <alimariam@google.com>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Commit-Queue: Thomas Quintanilla <tquintanilla@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103324}
2023-02-09 17:19:46 +00:00
Andrey Zaytsev
ff9148eaa2 Add Partitioned Storage support to StoragePartitionImpl::ClearDataForOrigin
Bug: 1410190
Change-Id: I308d9210080d52000a65c7c075c173a1c352a45e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4206828
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Commit-Queue: Andrey Zaytsev <andzaytsev@google.com>
Cr-Commit-Position: refs/heads/main@{#1099262}
2023-01-31 16:00:44 +00:00
Andrew Paseltiner
679b7daa22 Scope Attribution Reporting deletions to reporting origin only
Source origin and destination origin are no longer considered.

This change makes the source_origin and destination_origin columns
in the rate_limits table unread, but we retain them for use in
deletion by browsing data model key.

Bug: 1410198
Change-Id: I088bca42a4d4d268ed84c3b29f2c4427d37dc217
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4193479
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Theodore Olsauskas-Warren <sauski@google.com>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Quick-Run: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1097411}
2023-01-26 16:13:31 +00:00
Avi Drissman
adac219925 Update header includes for /base/functional in /content
bind.h, callback.h, callback_forward.h, and callback_helpers.h
moved into /base/functional/. Update the include paths to
directly include them in their new location.

Bug: 1364441
Change-Id: I32ec425b9c0e52ec4b50047bf3290fecc5c905ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4148554
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091567}
2023-01-11 23:46:39 +00:00
Austin Sullivan
5b88a173dc Delete the Storage Foundation API (a.k.a. NativeIO)
Bug: 1402547
Change-Id: I02daa6f84c84857dadb319b004602f08ebb24277
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4117386
Owners-Override: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1089011}
2023-01-04 23:10:59 +00:00
Russ Hamilton
959dd3ea18 Ad Auction Service now calls RegistersAdAsWon for both winners
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}
2022-12-15 02:59:51 +00:00
Nan Lin
65727413e8 Use SuitableOrigin when setting origins for SourceBuilder and TriggerBuilder
Bug: 1383580
Change-Id: I905cff2a4cfc97c43d6c9182fbeb467b4500a4d1
Disable-Rts: True
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4107128
Commit-Queue: Nan Lin <linnan@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1083527}
2022-12-15 02:43:24 +00:00
Sam Schlesinger
59f5144bbd Removed Platform Provided Trust Tokens
Second CL to remove platform provided trust tokens.

The previous CL: chromium-review.googlesource.com/c/chromium/src/+/4052381

Fixed: 1395146
Change-Id: Ib89e9a0a9d046eea126df1695e2e7e3a56831e63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4082201
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Steven Valdez <svaldez@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Reviewed-by: David Schinazi <dschinazi@chromium.org>
Commit-Queue: Sam Schlesinger <samschlesinger@google.com>
Cr-Commit-Position: refs/heads/main@{#1080565}
2022-12-07 21:36:17 +00:00
Johann Koenig
f390a5a268 Revert "Removed Platform Provided Trust Tokens"
This reverts commit f4be8032e0.

Reason for revert: Compile failure broke the tree:
https://ci.chromium.org/ui/p/chromium/builders/ci/linux-archive-rel/81290/overview

[91033/97417] CXX obj/content/test/content_browsertests/trust_token_browsertest.o
FAILED: obj/content/test/content_browsertests/trust_token_browsertest.o
../../buildtools/reclient/rewrapper -cfg=../../buildtools/reclient_cfgs/chromium-browser-clang/rewra...(too long)
In file included from ../../content/browser/network/trust_token_browsertest.cc:5:
../../content/browser/network/trust_token_browsertest.h:11:10: fatal error: 'content/public/common/trust_tokens.mojom.h' file not found
#include "content/public/common/trust_tokens.mojom.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[91097/97417] CXX obj/content/test/content_browsertests/devtools_trust_token_browsertest.o

Original change's description:
> Removed Platform Provided Trust Tokens
>
> As we don't currently plan to release platform provided trust tokens, this CL removes
> the existing code implementing them.
>
> Fixed: 1395146
>
> Change-Id: I71b395fad7ef4242c70c9cf281e02ecdc2234f76
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4052381
> Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: danakj <danakj@chromium.org>
> Reviewed-by: Richard Coles <torne@chromium.org>
> Reviewed-by: Daniel Murphy <dmurph@chromium.org>
> Reviewed-by: David Schinazi <dschinazi@chromium.org>
> Reviewed-by: Steven Valdez <svaldez@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Commit-Queue: Sam Schlesinger <samschlesinger@google.com>
> Reviewed-by: Max Curran <curranmax@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1080199}

Bug: 1395146
Change-Id: I8f8377620e4563faef9bc83e9a1c8b6b01a09e33
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4082472
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Johann Koenig <johannkoenig@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Johann Koenig <johannkoenig@google.com>
Cr-Commit-Position: refs/heads/main@{#1080207}
2022-12-07 07:03:09 +00:00
Sam Schlesinger
f4be8032e0 Removed Platform Provided Trust Tokens
As we don't currently plan to release platform provided trust tokens, this CL removes
the existing code implementing them.

Fixed: 1395146

Change-Id: I71b395fad7ef4242c70c9cf281e02ecdc2234f76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4052381
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: David Schinazi <dschinazi@chromium.org>
Reviewed-by: Steven Valdez <svaldez@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Sam Schlesinger <samschlesinger@google.com>
Reviewed-by: Max Curran <curranmax@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1080199}
2022-12-07 06:30:23 +00:00
Russ Hamilton
84df761c98 K-anonymity clean-up.
- 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}
2022-11-28 19:29:05 +00:00
Sean Maher
5b9af51fdd task posting v3: moving away from ThreadTaskRunnerHandle
To continue the migration away from TaskRunnerHandles, the codebase
was refactored using the following scripts:
shell script:
https://paste.googleplex.com/4673967729147904
python:
https://paste.googleplex.com/5824001174667264

This will do a few sed-like modifications, changing calls to methods of
ThreadTaskRunnerHandle to calls to methods of
SingleThreadTaskRunner::CurrentDefaultHandle, and swapping includes.

Bug: 1026641
AX-Relnotes: n/a.
Change-Id: Ia33b6dfebb15937481c619f5c838720ce7bb2676
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4031817
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Owners-Override: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1074085}
2022-11-21 15:32:47 +00:00
Russ Hamilton
1ff5371524 Refactor KAnonymity storage to only store non-default entries
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}
2022-11-17 14:42:15 +00:00
Ayu Ishii
a58434d55e Quota: Cleanup kPersistent in BrowsingDataRemover
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}
2022-10-20 15:53:10 +00:00
Russ Hamilton
2edbde00b3 Add support for clearing all interest group data (including k-anon keys)
Also adds better support for tracing interest group deletion.

Fixed: 1367276,1356960
Change-Id: Ifbaf1da5113935457a12b50ca981267bc9b5a5e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3913673
Reviewed-by: Caleb Raitto <caraitto@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Russ Hamilton <behamilton@google.com>
Cr-Commit-Position: refs/heads/main@{#1054401}
2022-10-03 23:14:05 +00:00
Ari Chivukula
c29c1b80a3 [StorageUsageInfo] (4) Rename StorageUsageInfoV2 to StorageUsageInfo
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}
2022-09-30 20:49:29 +00:00
Nan Lin
5df24843b2 Refactor StoragePartition::ClearData
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}
2022-09-30 15:43:31 +00:00
Ari Chivukula
236cd057b9 [StorageUsageInfo] (3) Remove legacy StorageUsageInfo
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}
2022-09-28 16:07:31 +00:00
Andrey Zaytsev
694310c2e1 Remove the deprecated origin field from StorageUsageInfo
Bug: 1361545
Change-Id: Idbc9603e7e6fe9ea749e88d6c95817118b5dc0ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3918258
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Andrey Zaytsev <andzaytsev@google.com>
Cr-Commit-Position: refs/heads/main@{#1051903}
2022-09-27 17:26:40 +00:00
Andrew Paseltiner
f377b7d84a Revert in-memory AttributionStorageSql DB setting on test completion
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}
2022-09-22 22:47:44 +00:00