mirror of
https://github.com/morgan9e/helium
synced 2026-04-14 00:14:20 +09:00
45 lines
2.3 KiB
C++
45 lines
2.3 KiB
C++
# This was added to the safebrowsing prefs in
|
|
# https://chromium-review.googlesource.com/c/chromium/src/+/6898756
|
|
# Move it to content_settings since we remove safebrowsing prefs
|
|
--- a/chrome/browser/content_settings/generated_javascript_optimizer_pref.cc
|
|
+++ b/chrome/browser/content_settings/generated_javascript_optimizer_pref.cc
|
|
@@ -13,6 +13,7 @@
|
|
#include "chrome/common/extensions/api/settings_private.h"
|
|
#include "components/content_settings/core/common/features.h"
|
|
#include "components/prefs/pref_service.h"
|
|
+#include "components/content_settings/core/common/pref_names.h"
|
|
|
|
using extensions::api::settings_private::Enforcement;
|
|
using extensions::api::settings_private::PrefObject;
|
|
--- a/chrome/browser/site_protection/site_familiarity_utils.cc
|
|
+++ b/chrome/browser/site_protection/site_familiarity_utils.cc
|
|
@@ -8,6 +8,7 @@
|
|
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
|
#include "components/content_settings/core/browser/host_content_settings_map.h"
|
|
#include "components/content_settings/core/common/features.h"
|
|
+#include "components/content_settings/core/common/pref_names.h"
|
|
#include "components/prefs/pref_service.h"
|
|
#include "content/public/common/content_features.h"
|
|
|
|
--- a/components/content_settings/core/browser/content_settings_pref_provider.cc
|
|
+++ b/components/content_settings/core/browser/content_settings_pref_provider.cc
|
|
@@ -89,6 +89,7 @@ void PrefProvider::RegisterProfilePrefs(
|
|
ContentSettingsPattern::kContentSettingsPatternVersion);
|
|
registry->RegisterBooleanPref(prefs::kInContextCookieControlsOpened, false);
|
|
registry->RegisterBooleanPref(kGeolocationMigrateExceptionsPref, false);
|
|
+ registry->RegisterBooleanPref(prefs::kJavascriptOptimizerBlockedForUnfamiliarSites, false);
|
|
|
|
WebsiteSettingsRegistry* website_settings =
|
|
WebsiteSettingsRegistry::GetInstance();
|
|
--- a/components/content_settings/core/common/pref_names.h
|
|
+++ b/components/content_settings/core/common/pref_names.h
|
|
@@ -267,6 +267,8 @@ inline constexpr char kDesktopSiteWindow
|
|
"desktop_site.window_setting";
|
|
#endif
|
|
|
|
+inline constexpr char kJavascriptOptimizerBlockedForUnfamiliarSites[] =
|
|
+ "safebrowsing.javascript_optimizer_blocked_for_unfamiliar_sites";
|
|
} // namespace prefs
|
|
|
|
#endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_PREF_NAMES_H_
|