Files
cef/patch/patches/config_3892.patch
Marshall Greenblatt f8a746373e Update to Chromium version 138.0.7204.0 (#1465706)
Mac: Require Xcode 16.3 (16E140) and SDK 15.4 (24E241)
2025-06-03 14:20:59 -04:00

98 lines
3.8 KiB
Diff

diff --git components/prefs/pref_service.h components/prefs/pref_service.h
index 0a360f45e89d9..c88c7ea9177e5 100644
--- components/prefs/pref_service.h
+++ components/prefs/pref_service.h
@@ -52,6 +52,10 @@ namespace base {
class FilePath;
}
+namespace pref_helper {
+class Registrar;
+}
+
namespace prefs {
class ScopedDictionaryPrefUpdate;
}
@@ -432,6 +436,8 @@ class COMPONENTS_PREFS_EXPORT PrefService {
// declared as a friend, too.
friend class PrefChangeRegistrar;
friend class subtle::PrefMemberBase;
+ // CEF registration manager.
+ friend class pref_helper::Registrar;
// These are protected so they can only be accessed by the friend
// classes listed above.
diff --git components/variations/BUILD.gn components/variations/BUILD.gn
index 32ce3e7dafda1..14fec0983015d 100644
--- components/variations/BUILD.gn
+++ components/variations/BUILD.gn
@@ -131,6 +131,7 @@ component("variations") {
":buildflags",
":variations_mojom",
"proto",
+ "//cef/libcef/features:buildflags",
"//components/crash/core/common:crash_key",
"//components/prefs",
"//components/version_info",
diff --git components/variations/synthetic_trials_active_group_id_provider.cc components/variations/synthetic_trials_active_group_id_provider.cc
index bd51697297471..3e669cd080457 100644
--- components/variations/synthetic_trials_active_group_id_provider.cc
+++ components/variations/synthetic_trials_active_group_id_provider.cc
@@ -27,7 +27,7 @@ SyntheticTrialsActiveGroupIdProvider::GetActiveGroupIds() {
return group_ids_;
}
-#if !defined(NDEBUG)
+#if !defined(NDEBUG) || BUILDFLAG(ENABLE_CEF)
std::vector<SyntheticTrialGroup>
SyntheticTrialsActiveGroupIdProvider::GetGroups() {
base::AutoLock scoped_lock(lock_);
@@ -38,7 +38,7 @@ SyntheticTrialsActiveGroupIdProvider::GetGroups() {
void SyntheticTrialsActiveGroupIdProvider::ResetForTesting() {
base::AutoLock scoped_lock(lock_);
group_ids_.clear();
-#if !defined(NDEBUG)
+#if !defined(NDEBUG) || BUILDFLAG(ENABLE_CEF)
groups_.clear();
#endif // !defined(NDEBUG)
}
@@ -53,7 +53,7 @@ void SyntheticTrialsActiveGroupIdProvider::OnSyntheticTrialsChanged(
for (const auto& group : groups) {
group_ids_.push_back(group.id());
}
-#if !defined(NDEBUG)
+#if !defined(NDEBUG) || BUILDFLAG(ENABLE_CEF)
groups_ = groups;
#endif // !defined(NDEBUG)
}
diff --git components/variations/synthetic_trials_active_group_id_provider.h components/variations/synthetic_trials_active_group_id_provider.h
index b4a999731d996..0bbac173fddf1 100644
--- components/variations/synthetic_trials_active_group_id_provider.h
+++ components/variations/synthetic_trials_active_group_id_provider.h
@@ -10,6 +10,7 @@
#include "base/component_export.h"
#include "base/synchronization/lock.h"
#include "base/thread_annotations.h"
+#include "cef/libcef/features/features.h"
#include "components/variations/active_field_trials.h"
#include "components/variations/synthetic_trials.h"
@@ -36,7 +37,7 @@ class COMPONENT_EXPORT(VARIATIONS) SyntheticTrialsActiveGroupIdProvider
// Returns currently active synthetic trial group IDs.
std::vector<ActiveGroupId> GetActiveGroupIds();
-#if !defined(NDEBUG)
+#if !defined(NDEBUG) || BUILDFLAG(ENABLE_CEF)
// In debug mode, not only the group IDs are tracked but also the full group
// info, to display the names unhashed in chrome://version.
std::vector<SyntheticTrialGroup> GetGroups();
@@ -60,7 +61,7 @@ class COMPONENT_EXPORT(VARIATIONS) SyntheticTrialsActiveGroupIdProvider
base::Lock lock_;
std::vector<ActiveGroupId> group_ids_; // GUARDED_BY(lock_);
-#if !defined(NDEBUG)
+#if !defined(NDEBUG) || BUILDFLAG(ENABLE_CEF)
// In debug builds, keep the full group information to be able to display it
// in chrome://version.
std::vector<SyntheticTrialGroup> groups_; // GUARDED_BY(lock_);