0
Commit Graph

256 Commits

Author SHA1 Message Date
Etienne Bergeron
0d67cccce4 Avoid multi-statements for Database::Execute(...)
This CL is deprecating the use of multi-statement for Execute(...).
The code should break the query in multiple calls.

For the unittests, it's common to load a script from a file.
For these case, the recommendation is to use
ExecuteScriptForTesting(...)

Bug: 40779018
Change-Id: Ia97a129b2e89b85bb31782a7c86833a86de66675
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6196597
Reviewed-by: Anthony Vallée-Dubois <anthonyvd@chromium.org>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Reviewed-by: Alex Turner <alexmt@chromium.org>
Reviewed-by: Justin Donnelly <jdonnelly@chromium.org>
Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
Reviewed-by: Sophie Chang <sophiechang@chromium.org>
Reviewed-by: Dominic Battré <battre@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Reviewed-by: Justin DeWitt <dewittj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1416222}
2025-02-05 09:03:54 -08:00
Alex Turner
bf28150966 Split certain AggregationService overall histograms by delay type
Copies the existing final status histogram (currently split by
scheduled vs unscheduled requests) with a new histogram that is split by
scheduled with full delay, scheduled with reduced delay and unscheduled
requests. Similarly copies the NumRetriesBeforeSuccess histogram
(except without the unscheduled breakout as it is conditioned on
success).

These new histograms will provide additional detail on failure
frequencies, given that these frequencies are likely to differ greatly
for the different 'delay types'.

While these histograms are intended as replacements, the old histograms
are kept around for now to provide continuity of data and preserve
alerting. Eventually, we should remove the old metrics.

Bug: 325449807
Change-Id: Ibccfc0eddf985798ca0c2da2dfe7eb80a5c5d48d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6221898
Reviewed-by: Dan McArdle <dmcardle@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1415794}
2025-02-04 13:30:04 -08:00
Anthony Vallée-Dubois
9adf0bbf4b Builder pattern in DatabaseOptions
DatabaseOptions is getting too large for the "explicit out of line
constructor for complex types" presubmit. Adding a constructor to it
prevents it from being an aggregate type, which is how most of the
callers currently use it.

This Cl makes DatabaseOptions members private and adds builder-type
setters for each member. It also updates all callers, and adds an out of
line constructor.

A future improvement could be to add a passkey to the setters for
discouraged options.

Bug: None
Change-Id: I63562f43c8b290247878d194039487b240e958c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6216099
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Owners-Override: Gabriel Charette <gab@chromium.org>
Commit-Queue: Anthony Vallée-Dubois <anthonyvd@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1414974}
2025-02-03 09:01:41 -08:00
Peter Kasting
1557e5fbe4 [cleanup] Replace base::ranges with std::ranges: content/
Done entirely with `git grep` and `sed` + `git cl format`, no
hand-editing.

Bug: 386918226
Change-Id: I8561612cb02c9d62c455836dba414ab402e40694
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6199140
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Owners-Override: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1412009}
2025-01-27 17:14:08 -08:00
Ramon Cano Aparicio
1538c09880 Rename HistogramBase::Count type to Count32 in content and net.
Add size to type name so the size is known without needing to lookup
the typedef.

Changed occurrences under content and net

Bug: 40899968
Change-Id: I44e37eb95fe361218496a6ab6a7153a30e8177ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6182574
Commit-Queue: Ramon Cano Aparicio <rcanoaparicio@google.com>
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Eric Orth <ericorth@chromium.org>
Reviewed-by: Luc Nguyen <lucnguyen@google.com>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1410416}
2025-01-23 09:37:59 -08:00
John Delaney
c2e8d2b45e Remove johnidel from OWNERs
Change-Id: Ifd83c98806544ce4971cc8c08d797768f5cd23fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6187185
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: John Delaney <johnidel@chromium.org>
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Commit-Queue: John Delaney <johnidel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1409902}
2025-01-22 12:42:12 -08:00
Andrew Verge
dd2518e10e Add a nonce argument to IsolationInfo::CreateTransient().
The nonce parameter is used to identify requests in the Network Service
that should be blocked. These requests originate from a fenced frame,
and are blocked when JavaScript in the fenced frame has successfully
resolved a call to window.fence.disableUntrustedNetwork().

In most cases, the nonce provided for a transient IsolationInfo should
correspond to the relevant nonce for the current frame. This can be
fetched via the StorageKey, or the RenderFrameHostImpl (via
GetIsolationInfoForSubresources() or similar). If there is no frame
nonce available, then std::nullopt can be passed explicitly instead.

Previously, there was an additional CreateTransientWithNonce() function that served the same purpose. That has been merged into
CreateTransient(nonce) in this CL. This CL has no semantic changes, and is essentially a refactor. Existing bare calls to CreateTransient() now are passed std::nullopt, preserving existing behavior. As a follow-up, we'll identify transient IsolationInfos that could be using a frame's nonce instead of std::nullopt, and use that nonce instead.

To add the nonce parameter to existing CreateTransient() calls, I ran:

tools/git/mffr.py -d 'IsolationInfo::CreateTransient\(\)' 'IsolationInfo::CreateTransient(std::nullopt)'

To convert calls to CreateTransientWithNonce() to the new
CreateTransient(nonce) form, I ran:

tools/git/mffr.py -d 'IsolationInfo::CreateTransientWithNonce' 'IsolationInfo::CreateTransient'

I also ran a "git cl format" to fix line wrapping issues caused by
the new argument.

Bug: 377330892
Change-Id: I83b99b8ef9f19926b0d694066656bc315e1c4778
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6102255
Reviewed-by: Xiaochen Zhou <xiaochenzh@chromium.org>
Reviewed-by: Carlos Knippschild <carlosk@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Shivani Sharma <shivanisha@chromium.org>
Commit-Queue: Andrew Verge <averge@chromium.org>
Reviewed-by: mmenke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1406164}
2025-01-14 09:37:27 -08:00
Ramon Cano Aparicio
6797d4e5e1 Rename HistogramBase::Sample to Sample32 in content.
Add size to type name so the size is known without needing to lookup
the typedef.
Continuation of https://chromium-review.googlesource.com/c/chromium/src/+/6163590

Changed occurrences under chromium/content

Bug: 40899968
Change-Id: I18af5c2d8d86656d0afc3a6094ab1aa5cb1b2f4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6164150
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Jinsuk Kim <jinsukkim@chromium.org>
Reviewed-by: Ryan Tarpine <rtarpine@chromium.org>
Reviewed-by: Roman Arora <romanarora@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Luc Nguyen <lucnguyen@google.com>
Commit-Queue: Ramon Cano Aparicio <rcanoaparicio@google.com>
Cr-Commit-Position: refs/heads/main@{#1404808}
2025-01-10 08:09:02 -08:00
Nathan Memmott
2e987d5eab Code Health: Clean up stale PrivacySandboxAggregationService
Fixed: 356624383
Change-Id: I6e9fff5535d2a46591ca5b752424bfa5f97192f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6092082
Reviewed-by: Alex Turner <alexmt@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Nathan Memmott <memmott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1396143}
2024-12-13 12:38:32 -08:00
Arthur Sonzogni
d5ce01f7ef C++11 std::array rewrite for memory safety [11/19]
Split from:
https://chromium-review.googlesource.com/c/chromium/src/+/6004959

Generated patch
---------------
- Tool: ./tool/clang/spanify/rewrite-multiple-platform.sh
- Platform: Linux.
- Filter: This includes 2400/4222 patches. I included the std::array
      ones and excluded build errors.

Google announcement:
--------------------
https://groups.google.com/a/google.com/g/chrome-memory-safety/c/RMiO4gaVLQA/m/Yz-3NCObAgAJ

Benchmarks:
----------
See design doc and
https://chromium-review.googlesource.com/c/chromium/src/+/6004959/21

Description
-----------
The consensus during the memory safety summit was to begin rewriting
relevant C-style arrays to C++11 std::array. It can be done immediately,
offers better developer ergonomics, and fix large chunks of the
-Wunsafe-buffer-usage errors in Chrome.

To clarify, this effort is complementary to the longer plan work with
enabling -fsanitize=array-bounds, and we plan to leverage both,
especially for protecting 3p code.

[Attached] is a document detailing the rationale, benefits, and
considerations for potential compile-time and performance impacts.

[Attached]:https://docs.google.com/document/d/1z5aBDg26lHmNDjXRCysElWKx7E4PAJXqykI_k7ondJI/edit?tab=t.0#heading=h.cqgo7wvp0kzt

NO_IFTTT=No need to update base/debug/stack_trace.h

Bug: 378069401
Change-Id: I6d36543c267f12c672cce00d75cf833fff238ebf
R: dcheng@chromium.org
AX-Relnotes: n/a.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6039265
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1395908}
2024-12-13 05:35:28 -08:00
Anthony Vallée-Dubois
e3c94919c5 Make database tag mandatory
This CL removes the default value of the `tag` argument on the 2
`sql::Database` constructors, and updates all callers that didn't
explicitly pass a tag to do so.

As a convenience, this CL also defines a common tag for unit tests.

This will allow the implementation and monitoring of per-database
performance metrics (time to open, statement execution time, VMSteps,
etc) without the possibility of having some of the databases
uninstrumented. This is useful for diagnosing issues such as crbug.com/369635654 in the wild, and required for some performance investigations that we have in the pipeline.

The last step of this work item (asserting that the tag is correctly defined in histograms.xml variants) is implemented in https://chromium-review.googlesource.com/c/chromium/src/+/6055279.

Bug: 40949392
Change-Id: I6dec0fb86a5e7b98cd42ac3a9db18e23eaf9e9bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6039025
Reviewed-by: manuk hovanesian <manukh@chromium.org>
Commit-Queue: Anthony Vallée-Dubois <anthonyvd@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1395446}
2024-12-12 08:47:47 -08:00
Anthony Vallée-Dubois
71d7031332 Change the database tag from a setter to a ctor param
This CL should be a mostly mechanical change, replacing the calls to
`set_histogram_tag` to an argument on the 2 `sql::Database`
constructors. Nothing else should be different.

Change-Id: Ie8fd1d7a677fa66ff90c426fea9367ac4c7c469d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6037574
Reviewed-by: Carlos Knippschild <carlosk@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: Etienne Bergeron <etienneb@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: Anthony Vallée-Dubois <anthonyvd@chromium.org>
Reviewed-by: mmenke <mmenke@chromium.org>
Reviewed-by: Siddhartha S <ssid@chromium.org>
Reviewed-by: Sophie Chang <sophiechang@chromium.org>
Reviewed-by: Ben Reich <benreich@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Reviewed-by: Daniel Rubery <drubery@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Ravjit Uppal <ravjit@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1391975}
2024-12-05 00:17:43 +00:00
Peter Kasting
8eba25cb99 Remove usage of base::make_span(): content/browser/ part 1
Replace with span() CTAD use, or more targeted helpers.

Bug: 341907909
Low-Coverage-Reason: LARGE_SCALE_REFACTOR no meaningful functional change
Change-Id: I2635aeabe0b7eb4e8411b4579d922fccb0283784
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6059467
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1389916}
2024-11-29 22:30:10 +00:00
Alex Turner
1949b3501e Remove support for old report format in Aggregation Service layer
Now that the filtering ID features have all been removed (see
crrev.com/c/6011871, crrev.com/c/6019343 and crrev.com/c/6032178), this
is no longer a need to support the old format. This takes the form of
always requiring a filtering_id_max_bytes to be set (instead of it being
an optional type).

This should be mostly a no-op, but if there are any reports scheduled
and saved to disk from before the features were enabled (M128), they
will now be upgraded to the new format instead of still using the old
one.

Bug: 330744610
Change-Id: I2a28352a778afa2e60f81cdbe5da02183b7c2f94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6035826
Reviewed-by: Nan Lin <linnan@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1387019}
2024-11-22 20:08:43 +00:00
Peter Kasting
1b56352f39 Cleanups from stricter span usage of size_t: content
More use of first(), compile-time sizes, etc.

Bug: none
Change-Id: Ibcd3e038d17251f7c3df0b2dbba952cdfcff300a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6027096
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1384113}
2024-11-17 20:47:33 +00:00
Nan Lin
e28af4e6d6 Remove feature kPrivacySandboxAggregationServiceFilteringIds
The feature was default enabled in M126.

Change-Id: Ia073119ed40d92901e284e3ff433c3fc3a8a421c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6011871
Commit-Queue: Nan Lin <linnan@chromium.org>
Reviewed-by: Alex Turner <alexmt@chromium.org>
Reviewed-by: Qingxin Wu <qingxinwu@google.com>
Cr-Commit-Position: refs/heads/main@{#1381954}
2024-11-12 20:57:48 +00:00
Dan McArdle
a7ef405140 AggregationService: Delete unused "trusted_server_url" feature param
Bug: 376837408
Change-Id: Ie0a064302245a8fe5f5b837ab203dc21e055a8a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5984554
Reviewed-by: Nan Lin <linnan@chromium.org>
Commit-Queue: Dan McArdle <dmcardle@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1379016}
2024-11-06 15:27:50 +00:00
Andrew Paseltiner
354bf7556b Remove obsolete pending-aggregatable-report-timing metrics
These were already used to reduce the delay down to 0-10 minutes in
crrev.com/c/4525396.

OBSOLETE_HISTOGRAMS=No longer needed as action was already taken using them.

Bug: 40259745
Change-Id: If40de31688cb40f5fa717f8c2c6d9b755a9d7afe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5933687
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: John Delaney <johnidel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1369006}
2024-10-15 20:42:42 +00:00
Dan McArdle
85fb52af12 AggregationService: Delete duplicate expectation for payload size
Bug: 371118062
Change-Id: Iba02d3337439afd1c602474bd0476373439fed24
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5904518
Reviewed-by: Alex Turner <alexmt@chromium.org>
Auto-Submit: Dan McArdle <dmcardle@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1364234}
2024-10-04 15:30:17 +00:00
Arthur Sonzogni
0a5d54489f Spanify: content/ (c-array conversions only)
Addresses ~14% of `-WUnsafe-buffer-usage` opt-out in `//content`.
This is a #cleanup.

The patch was initially partially generated by `./tool/clang/spanify`.

This patch applies conversions specifically to c-arrays in `//content`.
Although the `spanify` tool supports broader conversions, this change
intentionally focuses on c-arrays. Several manual fixes were made to
address anonymous struct issues and other edge cases encountered during
the conversion process.

Bug: 342213636, 40285824
Change-Id: I72666faa45a461ea27bb3608beeacc6c9fcd8a63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5824992
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1349804}
2024-09-02 11:23:35 +00:00
Dan McArdle
d995f58381 AggregationService: Add DVLOGs to explain why request was not created
Bug: 362462215
Change-Id: I66b802bc4d3e841d0a12db077650e15ba605affe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5824001
Commit-Queue: Dan McArdle <dmcardle@chromium.org>
Reviewed-by: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1348668}
2024-08-29 16:03:55 +00:00
Dan McArdle
060f89b905 AggregatableReport: Fix comment on ComputeTeeBasedPayloadLengthInBytes
I accidentally used an earlier version of the comment when I moved the
function definition to the .cc file. See <https://crrev.com/c/5765899>.

Bug: 356298372
Change-Id: I6f276cbee152661850a3eb40607bd94743251343
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5797952
Reviewed-by: Alex Turner <alexmt@chromium.org>
Commit-Queue: Dan McArdle <dmcardle@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1344353}
2024-08-20 20:19:24 +00:00
Peter Boström
01ab59ae08 Migrate NOTREACHED_NORETURN -> NOTREACHED
NOTREACHED() has turned [[noreturn]] so the former macro isn't needed
anymore.

This does not attempt to do a rewrite of any surrounding code, like:

if (!foo) {
  NOTREACHED();
}

to CHECK(foo);

Those transforms take a non-trivial amount of time (and there are
thousands of instances). Cleanup can be left as an exercise for the
reader.

NO_IFTTT=No-op-rename migration.

Bug: 40580068
Change-Id: I068c5fdce9dc4c352d8bdd62bb3cd2c0a2d59659
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5782602
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1342096}
2024-08-15 02:39:49 +00:00
Alex Turner
b303a61e94 Replace const std::string& with string_view for aggregation_service
This is now preferred. Also updates some Private Aggregation unittests
to match and some constexpr char arrays. Sql queries are also adapted
to use base::c_stringview instead of char*.

Change-Id: If96577d9cf67e49a60c54fa34b1762f8f2d60d0a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5783696
Reviewed-by: Qingxin Wu <qingxinwu@google.com>
Reviewed-by: Nan Lin <linnan@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1341913}
2024-08-14 20:33:47 +00:00
Dan McArdle
785edcfe41 AggregatableReport: Move payload length computation to .cc file
This is a behavior-preserving refactor.

Note that the ComputeCborArrayOverheadLen() function does not strictly
need to be constexpr, in fact it's never called with constexpr values.

Fixed: 356298372
Change-Id: Ib376bfdf28cad6b38dc1390931fe20e0987ab014
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5765899
Reviewed-by: Alex Turner <alexmt@chromium.org>
Commit-Queue: Dan McArdle <dmcardle@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1339287}
2024-08-08 21:01:05 +00:00
Dan McArdle
5beddeeaef AggregatableReport: Fix length prediction for CBOR arrays
Bug: 356298372
Change-Id: I540af48b06c817c4c09328bf6cd40bfa0caa6a90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5757433
Reviewed-by: Alex Turner <alexmt@chromium.org>
Commit-Queue: Dan McArdle <dmcardle@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1338773}
2024-08-07 23:22:51 +00:00
Dan McArdle
3e3d84a8f0 AggregatableReport: Add flexible payload length prediction
This change generalizes the payload length prediction to any number of
contributions.

Bug: 356298372
Change-Id: I44ed1032abf6ff4cb88d696d6b4da8441e94cd5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5749409
Reviewed-by: Alex Turner <alexmt@chromium.org>
Commit-Queue: Dan McArdle <dmcardle@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1336231}
2024-08-01 20:35:14 +00:00
Dan McArdle
ae657d2e30 AggregationService: Simplify ConstructUnencryptedTeeBasedPayload()
This is a behavior-preserving refactor. I found it a little confusing to
wrap the single payload in a vector rather than just a std::optional.

Change-Id: I61ae844a264c3a830a1c9087791c23252a6cbadc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5746931
Reviewed-by: Nan Lin <linnan@chromium.org>
Commit-Queue: Dan McArdle <dmcardle@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1334939}
2024-07-30 17:19:57 +00:00
Dan McArdle
7a9688599b AggregationService: Change max_contributions_allowed from int to size_t
Aligning on a single type enables us to avoid implicit and explicit
integer conversions. I think size_t is the natural choice because we
compare max_contributions_allowed against the size of containers.

Change-Id: Ib350e3fbf650f295dd6c6a77ee1c418a8021531d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5746930
Reviewed-by: Nan Lin <linnan@chromium.org>
Commit-Queue: Dan McArdle <dmcardle@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1334935}
2024-07-30 17:11:44 +00:00
Alex Turner
416bf246e5 Remove NotFatalUntil::M128 from Aggregation Service CHECKs
These were originally DCHECKs and were upgraded to CHECKs with
NotFatalUntil::M128 in crrev.com/c/5385557. We have not seen these be
triggered in the wild. Additionally, these are now fatal as M128 has
been reached; so, removing the argument should be a no-op.

Bug: 328089064
Change-Id: I287823f2501cc223c16858a282196cddfe4bb979
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5725784
Commit-Queue: Alex Turner <alexmt@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1331734}
2024-07-23 14:38:42 +00:00
David Benjamin
b54ed30e00 Replace base::numerics::Foo with base::Foo in //content
See https://chromium-review.googlesource.com/c/chromium/src/+/5402820

Bug: 40284755
Change-Id: I4b6692636043df7d4e8bb456b324fa5ad6ad1727
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5698546
Auto-Submit: David Benjamin <davidben@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: David Benjamin <davidben@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1326768}
2024-07-12 14:47:25 +00:00
Dan McArdle
ed224e2bb6 Reland: Split histograms for HTTP error code and status
Original description:

> This CL adds more specific variants of the following histograms:
>
> * PrivacySandbox.AggregationService.ReportSender.HttpResponseOrNetErrorCode
> * PrivacySandbox.AggregationService.ReportSender.Status
>
> The new histograms break out "Status" and "HttpResponseOrNetErrorCode"
> information based on whether the request was not scheduled, or was
> originally scheduled for future delivery after a reduced delay or full
> delay.
>
> ```
> $ ./tools/metrics/histograms/print_histogram_names.py --diff origin/main
> 6 histograms added:
> PrivacySandbox.AggregationService.ReportSender.ScheduledWithFullDelay.HttpResponseOrNetErrorCode
> PrivacySandbox.AggregationService.ReportSender.ScheduledWithFullDelay.Status
> PrivacySandbox.AggregationService.ReportSender.ScheduledWithReducedDelay.HttpResponseOrNetErrorCode
> PrivacySandbox.AggregationService.ReportSender.ScheduledWithReducedDelay.Status
> PrivacySandbox.AggregationService.ReportSender.Unscheduled.HttpResponseOrNetErrorCode
> PrivacySandbox.AggregationService.ReportSender.Unscheduled.Status
> 0 histograms removed:
> ```
>
> Initially, I thought I'd replace the histograms with their more specific
> variants. However, I chose to keep the original histograms to avoid any
> monitoring disruptions. The "Status" histogram is a critical system
> health metric, so it's probably not a good idea to delete it without
> having a successor in place.
>
> Bug: 325449807

In <https://crrev.com/c/5598362>, I introduced two new death tests that
used `EXPECT_DEATH_IF_SUPPORTED`. These passed CQ, but started failing
on linux-chromeos-chrome after the CL was merged. It turns out that
under some GN args, the `CHECK` macro will discard log strings rather
than streaming them.

Patchset 1 is just a cherrypick of the original CL. I verified that it
fails on the linux-chromeos-chrome as described in issue 352185227.

This reland replaces the gtest-provided `EXPECT_DEATH_IF_SUPPORTED` with
the //base wrapper `EXPECT_CHECK_DEATH_WITH`, which accounts for whether
the `CHECK` macro will stream or discard its messages.

Bug: 325449807, 352185227
Cq-Include-Trybots: luci.chrome.try:linux-chromeos-chrome
Change-Id: I1b1935c206ddb3b258b3229d888c3f614b3627e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5688555
Reviewed-by: Alex Turner <alexmt@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Commit-Queue: Dan McArdle <dmcardle@chromium.org>
Auto-Submit: Dan McArdle <dmcardle@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1326362}
2024-07-11 20:35:25 +00:00
Yoshisato Yanagisawa
b853f544e0 Revert "Split histograms for HTTP error code and status"
This reverts commit bd8b4bff1d.

Reason for revert: This CL is causing the continuous test failures in:
https://ci.chromium.org/ui/test/chrome/ninja%3A%2F%2Fcontent%2Ftest%3Acontent_unittests%2FAggregatableReportTest.DelayTypeSerializeNulloptCrashes?q=VHASH%3A8c384ae133969dc8

Original change's description:
> Split histograms for HTTP error code and status
>
> This CL adds more specific variants of the following histograms:
>
> * PrivacySandbox.AggregationService.ReportSender.HttpResponseOrNetErrorCode
> * PrivacySandbox.AggregationService.ReportSender.Status
>
> The new histograms break out "Status" and "HttpResponseOrNetErrorCode"
> information based on whether the request was not scheduled, or was
> originally scheduled for future delivery after a reduced delay or full
> delay.
>
> ```
> $ ./tools/metrics/histograms/print_histogram_names.py --diff origin/main
> 6 histograms added:
> PrivacySandbox.AggregationService.ReportSender.ScheduledWithFullDelay.HttpResponseOrNetErrorCode
> PrivacySandbox.AggregationService.ReportSender.ScheduledWithFullDelay.Status
> PrivacySandbox.AggregationService.ReportSender.ScheduledWithReducedDelay.HttpResponseOrNetErrorCode
> PrivacySandbox.AggregationService.ReportSender.ScheduledWithReducedDelay.Status
> PrivacySandbox.AggregationService.ReportSender.Unscheduled.HttpResponseOrNetErrorCode
> PrivacySandbox.AggregationService.ReportSender.Unscheduled.Status
> 0 histograms removed:
> ```
>
> Initially, I thought I'd replace the histograms with their more specific
> variants. However, I chose to keep the original histograms to avoid any
> monitoring disruptions. The "Status" histogram is a critical system
> health metric, so it's probably not a good idea to delete it without
> having a successor in place.
>
> Bug: 325449807
> Change-Id: I0957bb00b4528b0d26b820e5e38b08eb65f904ef
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5598362
> Reviewed-by: Nan Lin <linnan@chromium.org>
> Reviewed-by: Alex Turner <alexmt@chromium.org>
> Commit-Queue: Dan McArdle <dmcardle@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1325128}

Bug: 325449807, 352185227
Change-Id: I2b793c52039c6c60cb65ce8c4a49a6d1b2c5729f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5689287
Owners-Override: Yoshisato Yanagisawa <yyanagisawa@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@google.com>
Cr-Commit-Position: refs/heads/main@{#1325289}
2024-07-10 04:29:44 +00:00
Dan McArdle
bd8b4bff1d Split histograms for HTTP error code and status
This CL adds more specific variants of the following histograms:

* PrivacySandbox.AggregationService.ReportSender.HttpResponseOrNetErrorCode
* PrivacySandbox.AggregationService.ReportSender.Status

The new histograms break out "Status" and "HttpResponseOrNetErrorCode"
information based on whether the request was not scheduled, or was
originally scheduled for future delivery after a reduced delay or full
delay.

```
$ ./tools/metrics/histograms/print_histogram_names.py --diff origin/main
6 histograms added:
PrivacySandbox.AggregationService.ReportSender.ScheduledWithFullDelay.HttpResponseOrNetErrorCode
PrivacySandbox.AggregationService.ReportSender.ScheduledWithFullDelay.Status
PrivacySandbox.AggregationService.ReportSender.ScheduledWithReducedDelay.HttpResponseOrNetErrorCode
PrivacySandbox.AggregationService.ReportSender.ScheduledWithReducedDelay.Status
PrivacySandbox.AggregationService.ReportSender.Unscheduled.HttpResponseOrNetErrorCode
PrivacySandbox.AggregationService.ReportSender.Unscheduled.Status
0 histograms removed:
```

Initially, I thought I'd replace the histograms with their more specific
variants. However, I chose to keep the original histograms to avoid any
monitoring disruptions. The "Status" histogram is a critical system
health metric, so it's probably not a good idea to delete it without
having a successor in place.

Bug: 325449807
Change-Id: I0957bb00b4528b0d26b820e5e38b08eb65f904ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5598362
Reviewed-by: Nan Lin <linnan@chromium.org>
Reviewed-by: Alex Turner <alexmt@chromium.org>
Commit-Queue: Dan McArdle <dmcardle@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1325128}
2024-07-09 21:01:38 +00:00
Dan McArdle
c140ea7ab6 Reword doc comment on AggregatableReportRequest::Create()
Change-Id: I2aabd84a1ac349d54b2b21987ff1db1a91db90d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5676471
Reviewed-by: Nan Lin <linnan@chromium.org>
Commit-Queue: Dan McArdle <dmcardle@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1324921}
2024-07-09 17:28:18 +00:00
Alex Turner
e9dfb8bebd Enable Private Aggregation API filtering IDs feature
Enables the feature flag by default. Also updates tests and golden
reports accordingly, including improving some documentation as a
drive-by.

Bug: 330744610
Change-Id: Ic5054d7aa9cd14ed39df105cef2ae53d9fa005f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5675710
Commit-Queue: Alex Turner <alexmt@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1324443}
2024-07-08 19:55:21 +00:00
Anthony Garant
9132766d9f Add filtering id to attribution aggregatable reports
spec: https://github.com/WICG/attribution-reporting-api/pull/1290

When the feature is enabled, it adds configured filtering ids to
reports' contributions. The report version is also bumped to '1.0'.

In case a browser downgrade where pending reports are stored with
filtering ids, if the downgraded version is below the version including
this change, the report would still be sent without filtering id. This
is if the DB hasn't been razed after the browser version downgrade.

Bug: 345274918
Change-Id: I159884f01a73d8f634d57050d3e98342abfe413c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5609093
Auto-Submit: Anthony Garant <anthonygarant@chromium.org>
Commit-Queue: Anthony Garant <anthonygarant@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1324268}
2024-07-08 16:12:50 +00:00
Nan Lin
e658e7db94 Validate more fields in shared info for aggregatable debug reports
This CL validates all fields in `shared_info` except for `report_id`
which is non-deterministic. The `shared_info` is included in the
payload as a dictionary instead of a string for easier comparison.

Bug: 343870498
Change-Id: Ie2539f671d4dc68a53b052cff3322c57b930cc92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5605162
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1312014}
2024-06-07 16:01:51 +00:00
Evan Stade
e63b834356 Sql: change SQL script parameter type from char* to cstring_view
And some other related updates.

GetUniqueStatement is updated to take a base::cstring_view, which is a
null-terminated string that can be either a char[] or std::string.

GetCachedStatement should very rarely be dynamically constructed, as
it should almost always be statically known. Thus it has less need to
take a `std::string`. However, taking a `char*` has not prevented
callers from using a `string` with `c_str()`, whether or not the
string was necessary or appropriate. Therefore we might as well
update GetCachedStatement as well for consistency.

Bug: 341639215

Change-Id: If034a0db0f6546ac54dd99dbc423f1a76bf02727
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5571204
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Elad Alon <eladalon@chromium.org>
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Reviewed-by: Nathan Memmott <memmott@chromium.org>
Reviewed-by: Angela Yoeurng <yoangela@chromium.org>
Reviewed-by: Steven Bingler <bingler@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Reviewed-by: Matt Reichhoff <mreichhoff@chromium.org>
Reviewed-by: Cassy Chun-Crogan <cassycc@google.com>
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Austin Sullivan <asully@chromium.org>
Reviewed-by: Max Curran <curranmax@chromium.org>
Reviewed-by: Matthew Jones <mdjones@chromium.org>
Reviewed-by: John Rummell <jrummell@chromium.org>
Reviewed-by: Patrick Meenan <pmeenan@chromium.org>
Reviewed-by: Alex Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1312004}
2024-06-07 15:55:23 +00:00
Dan McArdle
5a9dd8612f AggregationServiceStorageSql: Only poison when db is open to avoid crash
This prevents a DCHECK crash in sql::Database::Poison(). It's unclear
whether Poison() should be so strict (see linked bug), but let's appease
it for the time being.

sql::Database::Poison() enforces that the only reason its internal `db_`
pointer could be null is when the database has been poisoned. However,
it turns out that attempting to open a directory as a database produces
exactly this scenario. As a workaround, we can change our database error
callback to not poison a database that is already closed.

Bug: 341947669
Change-Id: I2a214d5842cfde50242734dec1ae8ca61c264fcf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5564404
Commit-Queue: Nan Lin <linnan@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Auto-Submit: Dan McArdle <dmcardle@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1309335}
2024-06-03 15:24:31 +00:00
Nan Lin
2f7f87dd2d Remove kAggregationServiceMultipleCloudProviders feature checking
The feature was default enabled in M120.

We keep the feature as it is still associated with an allowlist parameter used for
local testing.

Change-Id: Iad59f783ead9a31940bdf0013247b9cbab21ddf8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5546334
Reviewed-by: Qingxin Wu <qingxinwu@google.com>
Reviewed-by: Alex Turner <alexmt@chromium.org>
Reviewed-by: Yao Xiao <yaoxia@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1304630}
2024-05-22 20:10:07 +00:00
Alex Turner
ef5c23b961 Remove aggregatable reports padding feature
This feature has been enabled by default since M119 and can now be
removed as we should not need the capability to disable this.

Bug: 40280536
Change-Id: If02558710c42e0e924c55cfe51c264f17c0bf312
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5538793
Commit-Queue: Alex Turner <alexmt@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1301441}
2024-05-15 18:23:27 +00:00
Alex Turner
a4738689c3 Support filtering IDs in Private Aggregation layer
Adds support for the new filtering_id and filtering_id_max_bytes fields.
This support is not currently hooked up to either Shared Storage or
Protected Audience. That support will be added in separate cls.

The spec is available here:
https://github.com/patcg-individual-drafts/private-aggregation-api/pull/123

Bug: 330744610
Change-Id: Iade0c91a6ad018b7bd4b709a4a7615e783d8d9b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5443375
Reviewed-by: Qingxin Wu <qingxinwu@google.com>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Reviewed-by: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Mike Taylor <miketaylr@chromium.org>
Reviewed-by: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1297012}
2024-05-06 18:53:50 +00:00
Alex Turner
41304b9cf6 Rename filtering_id_byte_size to filtering_id_max_bytes
This follows discussion on the spec PR:
https://github.com/patcg-individual-drafts/private-aggregation-api/pull/123#issuecomment-2090688985.
This change should be a no-op (and the feature relying on this has never
been enabled by default anyway).

Bug: 330744610
Change-Id: Ia06439b9a717ce8283fbc71f90a296bf9501d848
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5506763
Reviewed-by: Nan Lin <linnan@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1296864}
2024-05-06 15:30:24 +00:00
Alison Gale
770f3fce37 Migrate TODOs referencing old crbug IDs to the new issue tracker IDs
The canonical bug format is TODO(crbug.com/<id>). TODOs of the
following forms will all be migrated to the new format:

- TODO(crbug.com/<old id>)
- TODO(https://crbug.com/<old id>)
- TODO(crbug/<old id>)
- TODO(crbug/monorail/<old id>)
- TODO(<old id>)
- TODO(issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/u/1/issues/<old id>)
- TODO(bugs.chromium.org/<old id>)

Bug id mapping is sourced from go/chrome-on-buganizer-prod-issues.
See go/crbug-todo-migration for details.

#crbug-todo-migration

Bug: b/321899722
Change-Id: Ibc66b8c440e4bcdef414e77fef4d9874d2ea9951
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5493800
Auto-Submit: Alison Gale <agale@chromium.org>
Commit-Queue: Alison Gale <agale@chromium.org>
Reviewed-by: Peter Boström <pbos@chromium.org>
Owners-Override: Alison Gale <agale@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1293330}
2024-04-27 00:39:58 +00:00
Alison Gale
81f4f2c793 Migrate TODOs referencing old crbug IDs to the new issue tracker IDs
The canonical bug format is TODO(crbug.com/<id>). TODOs of the
following forms will all be migrated to the new format:

- TODO(crbug.com/<old id>)
- TODO(https://crbug.com/<old id>)
- TODO(crbug/<old id>)
- TODO(crbug/monorail/<old id>)
- TODO(<old id>)
- TODO(issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/u/1/issues/<old id>)
- TODO(bugs.chromium.org/<old id>)

Bug id mapping is sourced from go/chrome-on-buganizer-prod-issues.
See go/crbug-todo-migration for details.

#crbug-todo-migration

Bug: b/321899722
Change-Id: Iee14d10d544e9f0ec046117cc4ec8a55c427adc0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5469947
Reviewed-by: Darryl James <dljames@chromium.org>
Owners-Override: Alison Gale <agale@chromium.org>
Commit-Queue: Alison Gale <agale@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1290838}
2024-04-22 19:33:31 +00:00
Nan Lin
5ab0488632 Refactor to accept coordinator allowlist in feature param
Instead of specify explicitly for AWS and GCP, it's more extensible to
accept coordinator allowlist in the feature param. This also allows
coverage in the interop tests which can override the allowlist.

Change-Id: Ib0fb47205e0b7a9b1a5004df06e89678495c372d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5444731
Reviewed-by: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Reviewed-by: Alex Turner <alexmt@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1290765}
2024-04-22 18:06:50 +00:00
Alison Gale
47d1537de7 Migrate TODOs referencing old crbug IDs to the new issue tracker IDs
The canonical bug format is TODO(crbug.com/<id>). TODOs of the
following forms will all be migrated to the new format:

- TODO(crbug.com/<old id>)
- TODO(https://crbug.com/<old id>)
- TODO(crbug/<old id>)
- TODO(crbug/monorail/<old id>)
- TODO(<old id>)
- TODO(issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/u/1/issues/<old id>)
- TODO(bugs.chromium.org/<old id>)

Bug id mapping is sourced from go/chrome-on-buganizer-prod-issues.
See go/crbug-todo-migration for details.

#crbug-todo-migration

Bug: b/321899722
Change-Id: Ieeb461e2d489e86fd50b87a2a0721a2be34520c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5467317
Owners-Override: Alison Gale <agale@chromium.org>
Commit-Queue: Darryl James <dljames@chromium.org>
Commit-Queue: Alison Gale <agale@chromium.org>
Reviewed-by: Darryl James <dljames@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1290198}
2024-04-19 21:31:46 +00:00
Alex Turner
3fad4a8582 Support filtering IDs in aggregation_service
Adds support for the new filtering_id field (added in
crrev.com/c/5420154) and the filtering_id_byte_size field. If a non-null
byte size is provided, filtering IDs are allowed to be non-null and will
be serialized to CBOR.

This support is not currently used by any API (but this will be added
for Private Aggregation in crrev.com/c/5443375). A kill switch is also
added to ignore all filtering IDs should disabling the functionality
be necessary.

Bug: 330744610
Change-Id: I1ddebdb999cad834745814c6403ee59432fcff4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5421490
Reviewed-by: Nan Lin <linnan@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1289971}
2024-04-19 16:09:01 +00:00
Alex Turner
fad25995f7 Add filtering_id to histogram contribution type (no-op)
Adds the new field, but leaves it empty (nullptr) for all uses. Also
adds some CHECKs and ReportBadMessages to ensure the field is not used
until full support is added. This cl should be a no-op.

This cl has been separated out from the other cls to simplify review.
Full support is added in dependent cls (starting crrev.com/c/5421490).

Bug: 330744610
Change-Id: I4cb60a46c8498001ff280462fd07e8a31d352654
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5420154
Reviewed-by: Nan Lin <linnan@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Reviewed-by: Garrett Tanzer <gtanzer@chromium.org>
Reviewed-by: Qingxin Wu <qingxinwu@google.com>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Cr-Commit-Position: refs/heads/main@{#1286472}
2024-04-12 14:37:14 +00:00