This pref will possibly be removed in future, and when that occurs, this
local implementation can be removed too.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/784166ebb585a9f6e12eb2ed4ba1209375b94b3b
commit 784166ebb585a9f6e12eb2ed4ba1209375b94b3b
Author: Mariam Ali <alimariam@google.com>
Date: Tue Jul 5 16:03:18 2022 +0000
Remove FLoC dead code from Privacy Sandbox Service
As FLoC the feature is removed from the codebase, this CL removes all
the logic of string selection for FLoC state as it cannot be changed
by the user.
- remove FLoC state retrieval methods.
- move the string retrieval to the Privacy Sandbox Bridge for android.
- deprecate FLoC prefs.
- remove unit tests for FLoC states that are no longer valid.
A CL to remove all FLoC code along with its UI elements will follow once Privacy Sandbox Settings 3 is launched.
Bug: 1299720
Chromium change:
https://chromium.googlesource.com/chromium/src/+/1c364279dc21020a5fccd842d06a6b7eb58cd060
commit 1c364279dc21020a5fccd842d06a6b7eb58cd060
Author: Daniel Cheng <dcheng@chromium.org>
Date: Wed Jul 6 21:56:42 2022 +0000
Use base::Value::Dict in WebUI helpers where appropriate.
The primary motivation is to use `base::Value::Dict` inside
`WebUIDataSourceImpl` for its `localized_strings_` field. This ends up
having a large transitive effect, since these strings are passed to
templating functions that should take a base::Value::Dict as well.
- Update various uses of the legacy dictionary APIs to the modern
`base::Value::Dict` API.
- Where simple and unintrusive, use std::move() to pass string values
to `Set()`.
- Pass around `base::Value::Dict` by {const,mutable} reference when a
parameter is always expected to be non-null rather than relying on a
`CHECK()` in the implementation.
- Change `load_time_data` to a `base::Value::Dict` for the
various builder functions.
- Simplify a number of Set() calls with a `std::string()` or
`std::u16string()` value to use the more-efficient `""` instead.
- Remove unnecessary use of the dotted-path APIs when the dictionary
keys have no embedded `.`.
- Migrate necessary use of the dotted-path APIs to the modern form
instead of using the initializer list form.
- Remove global `std::string` objects in tests that require a static
destructor.
- Remove no-longer-needed `base::Value` wrapper when comparing against
another `base::Value()`.
- Remove a `base::NoDestructor<std::string>` caching rarely-used data.
Bug: 1187061
Chromium change:
https://chromium.googlesource.com/chromium/src/+/949656831d4cb0bf282de7b190d84129294b12a9
commit 949656831d4cb0bf282de7b190d84129294b12a9
Author: Alex Cooper <alcooper@chromium.org>
Date: Mon Jul 11 17:56:16 2022 +0000
[CodeHealth] Remove Value::GetAsList
Removes the last two instances of base::Value::GetAsList. One in
chromedriver, where the only usage can (and was) updated to use
base::Value::List instead. One in base::ListValue::From, which now does
the same cast that GetAsList used to do, but since the intention is to
remove GetAsList, it seems acceptable to move it into the (slightly
longer lived) helper method that will eventually be replaced itself.
Fixed: 1187009
Chromium change:
https://chromium.googlesource.com/chromium/src/+/c68eea06abb338bf3a7a7782588b4fc77079d25e
commit c68eea06abb338bf3a7a7782588b4fc77079d25e
Author: Luc Nguyen <lucnguyen@google.com>
Date: Mon Jun 27 19:37:49 2022 +0000
Stop processing variation IDs defined in flags twice in Chrome browser
tl;dr: In Chrome Browser, variation IDs from about://flags are appended
to the command line in order for them to show up in about://version.
This has the effect that these variation IDs are processed twice in
`VariationsIdsProvider::ForceVariationIds()` (once from flags, and once
from the command line).
---
Work is underway in crrev/c/3628020 to prevent variation IDs from being
defined multiple times. I noticed only very recently that forcing a
flag in about://flags that had a variation ID would throw the error
that the ID was being redefined from the command line, despite not
doing so. Looking deeper, it is because variation IDs from flags are
being appended to the command line in Chrome browser. This is done in
`FlagsState::AddSwitchesToCommandLine()`. This has the effect that these
variation IDs are processed twice in
`VariationsIdsProvider::ForceVariationIds()` (once from flags, and once
from the command line).
This CL adds a parameter to
`VariationsFieldTrialCreator::SetUpFieldTrials` so that command line
variation IDs are passed as a parameter now, and we pass in the unedited
switch value (before they are modified by flags). For unaffected
platforms, we simply pass the value of the switch, i.e., a no-op.
Bug: 1294948
Chromium change:
https://chromium.googlesource.com/chromium/src/+/b8a84a93a6757dd351bbfd79dba66eb2301466a0
commit b8a84a93a6757dd351bbfd79dba66eb2301466a0
Author: Joe DeBlasio <jdeblasio@chromium.org>
Date: Mon Jun 27 18:17:13 2022 +0000
[Lookalikes] Add allowlist scoping support
This CL adds support for allowlist entries that are only allowed to
spoof specific domains. It updates both logic for Safety Tips and
the Lookalike Interstitial to use this scoping.
Bug: 1225840
Chromium change:
https://chromium.googlesource.com/chromium/src/+/0b85230d0a26f7441adcc975f8651a787f089247
commit 0b85230d0a26f7441adcc975f8651a787f089247
Author: Theodore Olsauskas-Warren <sauski@google.com>
Date: Tue Jun 28 12:05:07 2022 +0000
Privacy Sandbox Settings: Remove preference reconciliation logic
When the first version of the Privacy Sandbox Settings page was
launched, logic to set the default value of the main preference was
introduced.
This logic was required to consult both synced, and un-synced, state to
determine what initial state a user should have.
This logic has been running for all users for >1 year now, and so we
expect the vast majority of users to have been appropriately
initialized.
This CL removes the logic, termed "reconciliation", from the code base.
Bug: 1166665
Chromium change:
https://chromium.googlesource.com/chromium/src/+/af77da79ffa866e1bfa88b14e6e2db4c3704c691
commit af77da79ffa866e1bfa88b14e6e2db4c3704c691
Author: Matt Menke <mmenke@chromium.org>
Date: Wed Jun 22 19:10:54 2022 +0000
Extensions: Make Event use base::Value::List, part 1.
It was using unique_ptr<base::ListValue>. ListValue is deprecated, and
unique_ptrs should now only be used for Values than can be null, which
the arguments cannot be.
Also add a set of overloaded constructors that take base::Value::List
instead of vector<base:Value> (better known as
vector<base::Value::DeprecatedListStorage>).
I'll migrate callers of the constructors in followup CLs.
Bug: 1338341
Chromium change:
https://chromium.googlesource.com/chromium/src/+/8e71b8677f674bab739791d555b1bc32df30c392
commit 8e71b8677f674bab739791d555b1bc32df30c392
Author: Claudio DeSouza <cdesouza@igalia.com>
Date: Sat Jun 25 12:00:48 2022 +0000
Modernising base::JsonReader to return base::expected
This CL adjusts JsonReader::ReadAndReturnValueWithError to
use base::expected, as it provides a more intuitive way to
communicate success/failure.
Bug: 1338575
Chromium change:
https://chromium.googlesource.com/chromium/src/+/5ddf3a50ad6fcef407f7c8443b4a5b20c28c777e
commit 5ddf3a50ad6fcef407f7c8443b4a5b20c28c777e
Author: Scott Haseley <shaseley@chromium.org>
Date: Mon Jun 27 21:34:11 2022 +0000
Extend SetTimeoutWithout1MsClampEnabled enterprise policy
This extends the SetTimeoutWithout1MsClampEnabled policy to M107. The
feature was previously enabled at 1% stable and is shipping in M104;
extending the policy will give time for enterprises to adjust if compat
issues arise.
This also fixes an issue with the original CL (crrev.com/3503058) where
the policy was being registered as both a local and per-profile policy,
but only checked in profile prefs.
Bug: 402694, 1335308
Chromium change:
https://github.com/chromium/chromium/commit/88d7b2e74349cbf8b3e15b61cc0663d65f9d1873
Rename GetMainFrame to GetPrimaryMainFrame
Progressively rename some usages of GetMainFrame to GetPrimaryMainFrame.
This is an automated change via emacs xref integration via codesearch.
BUG=1250404
Change-Id: Ibb5ca2055776693b332e26d7b348b81d65d1900c
Chromium change:
https://chromium.googlesource.com/chromium/src/+/50e14e158252cee0166800d627b610dcfae1e4e7
commit 50e14e158252cee0166800d627b610dcfae1e4e7
Author: Matt Menke <mmenke@chromium.org>
Date: Fri Jun 10 14:48:31 2022 +0000
Modernize base::Value usage in profile_avatar_icon_util.
In particular, make all list and dictionary accesses and creation use
base::Value::List and base::Value::Dict.
That means replacing implicit uses of Value::DeprecatedListStorage
(vector<Value>) and Value::DeprecatedDictStorage
(flat_map<string,Value>)
Bug: 1187001
Chromium change:
https://chromium.googlesource.com/chromium/src/+/f589a6c789791d898b8ea4ea8e5182b3b1663d9a
commit f589a6c789791d898b8ea4ea8e5182b3b1663d9a
Author: Peter Kasting <pkasting@chromium.org>
Date: Wed Jun 15 23:02:26 2022 +0000
Move a whole bunch of colors from ThemeProvider to ColorProvider.
The biggest change here is turning off the OmniboxContrast unittest for
Windows high contrast. It turns out the test previously wasn't testing
how high contrast actually works on Windows (i.e. using platform-native
colors), and was instead testing using the
IncreasedContrastThemeSupplier. Once this was switched to
ColorProvider, the test started to fail. Filed bug 1336315 for this.
The remainder of the changes are fairly mechanical, just switching over
how colors are computed and removing all the non-overwritable colors
from the Theme Pak.
Bug: 1003612
Chromium change:
https://chromium.googlesource.com/chromium/src/+/50e14e158252cee0166800d627b610dcfae1e4e7
commit 50e14e158252cee0166800d627b610dcfae1e4e7
Author: Matt Menke <mmenke@chromium.org>
Date: Fri Jun 10 14:48:31 2022 +0000
Modernize base::Value usage in profile_avatar_icon_util.
In particular, make all list and dictionary accesses and creation use
base::Value::List and base::Value::Dict.
That means replacing implicit uses of Value::DeprecatedListStorage
(vector<Value>) and Value::DeprecatedDictStorage
(flat_map<string,Value>)
Bug: 1187001
Chromium change:
https://chromium.googlesource.com/chromium/src/+/d60aaeea8014c75e2ac421c244b51d38dbef197e
commit d60aaeea8014c75e2ac421c244b51d38dbef197e
Author: Colin Blundell <blundell@chromium.org>
Date: Mon Jun 20 11:01:53 2022 +0000
[Preconnect] Stop specially prioritizing preconnect tasks
This CL eliminates the execution of preconnect tasks on a custom
high-priority task queue that was introduced in
https://chromium-review.googlesource.com/c/chromium/src/+/1527536,
reverting back to the behavior prior to that CL of executing these tasks
on the default (priority-based) task queues. We have done
experimentation and found that execution on the custom high-priority
task queue brought no performance benefits over execution on the default
priority-based task queues (summary in
https://bugs.chromium.org/p/chromium/issues/detail?id=1257582#c28).
Specifically, this CL is implementing the launch of the NoStandaloneQ
arm of the experiment analyzed on that bug. The logic for why this is
the case bears explicit mention:
- NoStandaloneQ enables the "kTreatPreconnectTaskTypeAsDefault"
base::Feature.
- When this feature is enabled, invoking
GetUIThreadTaskRunner({BrowserTaskType::kPreconnect}) returns the
task runner for the task priority of the BrowserTaskTraits instance
created via {BrowserTaskType::kPreconnect}. This task priority is
USER_BLOCKING, since BrowserTaskTraits inherits the default value
from TaskTraits and doesn't modify that default value.
- In this CL, we simply stop passing a TaskRunner to the calls to
BindNewPipeAndPassRemote() made in the preconnect code. When no
TaskRunner is explicitly specified to these calls, they use
SequencedTaskRunnerHandle::Get(). The task runner returned by
SequencedTaskRunnerHandle::Get() on the UI thread (on which these
calls are executing) is also the task runner for the USER_BLOCKING
priority, i.e., the same task runner that is currently being passed
when kTreatPreconnectTaskTypeAsDefault is enabled.
This CL also eliminates the kPreconnect browser task trait, as there
are now no uses of it in the codebase.
Bug: 1257582
Chromium change:
https://chromium.googlesource.com/chromium/src/+/0ad20eedebe886d21cc1b6edddb95eb35c4ae44c
commit 0ad20eedebe886d21cc1b6edddb95eb35c4ae44c
Author: Claudio DeSouza <cdesouza@igalia.com>
Date: Fri Jun 17 08:55:21 2022 +0000
[CodeHealth] Remove base::DictionaryValue from SearchEnginesHandler
This CL removes the use of the deprecated base::DictionaryValue in the
interface of SearchEnginesHandler, which also eliminates the unnecessary
use of std::unique_ptr<> in this case.
Bug: 1187001
With MPArch, a WebContents could have different main frames at different
times.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/2e35a87fa58fbb9f84b9e7b4ffd6e7a9f394f2b3
commit 2e35a87fa58fbb9f84b9e7b4ffd6e7a9f394f2b3
Author: Dave Tapuska <dtapuska@chromium.org>
Date: Wed Jun 15 16:45:59 2022 +0000
Remove WebContents::GetMainFrame.
Reland 1522398b4b6f6d353cbbbe2aa23ee6c3bdf50dbd with one additional
test fixed. This change previously landed but was reverted due to
a test being added while this change was in the CQ.
All usages have been rewritten to GetPrimaryMainFrame. Remove the
deprecated API.
BUG=1250404
Chromium changes:
https://source.chromium.org/chromium/chromium/src/+/86f47b025376bc76df06606b14cf39bd724d0571
commit 86f47b025376bc76df06606b14cf39bd724d0571
Author: Dylan Cutler <dylancutler@google.com>
Date: Fri Jan 21 01:12:22 2022 +0000
Differentiate partitioned and unpartitioned cross-site cookies in 3P
cookie blocking
Partitioned attribute (aka CHIPS) explainer:
https://github.com/WICG/CHIPS
Design doc for 3PC blocking changes:
https://docs.google.com/document/d/1c5kuBkrcZ3-D-CUqTV6GRKOA2NULTmv11opW8L3Td2g/edit?usp=sharing
Bug: 1225444
https://source.chromium.org/chromium/chromium/src/+/22f9ca4cc9988459e83f672667fccf469254fc84
commit 22f9ca4cc9988459e83f672667fccf469254fc84
Author: Chris Fredrickson <cfredric@chromium.org>
Date: Fri Jun 10 16:33:42 2022 +0000
Factor settings-matching logic into a helper.
This aims to simplify the GetCookieSettingWithMetadata flow, by moving
repetitive and uninteresting details out of the main flow.
It also serves to ensure we always use the same criteria when
determining if a content settings entry matches.
https://source.chromium.org/chromium/chromium/src/+/806fab312767d35a62db5372a9a625e8010d1e54
commit 806fab312767d35a62db5372a9a625e8010d1e54
Author: Chris Fredrickson <cfredric@chromium.org>
Date: Mon Jun 13 22:11:33 2022 +0000
Rename enum names and variant names to be more clear.
This CL changes the name of the ThirdPartyCookieBlockingSetting enum to
be ThirdPartyBlockingOutcome, since it is used to describe the *outcome*
of applying the setting, rather than describing the setting itself; and
it's redundant to call it a cookie-related setting, since everything in
the CookieSettings class is related to cookies.
It also changes the names of the variants of the enum to be more clear.
E.g., kThirdPartyStateAllowed was easy to misinterpret as meaning "the
context is third-party and all cookies are allowed", but it's really
used to mean "the third-party-cookie-blocking setting doesn't influence
whether this cookie is accessible in this context". It also adds
comments to indicate the semantics of each variant.
No behavior is changed in this CL.
https://source.chromium.org/chromium/chromium/src/+/cca8d85eec4161f9f462adfff858d6b00e8d1f47
commit cca8d85eec4161f9f462adfff858d6b00e8d1f47
Author: Chris Fredrickson <cfredric@chromium.org>
Date: Mon Jun 13 17:24:04 2022 +0000
Decouple Partitioned semantics from Storage Access permission settings.
Route.ts and router.js are part of the
chrome/browser/resources/settings:build_ts target, the same one where our
override files go into, so there's no need for the old dependency on the
router js_library which is now only relevant to CrOS.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/e4112a9248715aa9c5c438576a4c12208142703d
commit e4112a9248715aa9c5c438576a4c12208142703d
Author: dpapad <dpapad@chromium.org>
Date: Tue Jun 14 18:30:18 2022 +0000
Settings: Limit c/b/r/settings:closure_compile to CrOS builds.
Bug: 1316438