chore: bump chromium to 108.0.5329.0 (main) (#35628)

Co-authored-by: Samuel Attard <sattard@salesforce.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
This commit is contained in:
electron-roller[bot] 2022-10-03 13:21:00 -07:00 committed by GitHub
parent 94955a7999
commit 16f459228b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
178 changed files with 1000 additions and 936 deletions

View file

@ -59,6 +59,7 @@ class DesktopCapturer : public gin::Wrappable<DesktopCapturer>,
void OnSourceThumbnailChanged(int index) override {}
void OnSourcePreviewChanged(size_t index) override {}
void OnDelegatedSourceListSelection() override {}
void OnDelegatedSourceListDismissed() override {}
private:
void UpdateSourcesList(DesktopMediaList* list);

View file

@ -294,14 +294,14 @@ v8::Local<v8::Value> SystemPreferences::GetUserDefault(
}
void SystemPreferences::RegisterDefaults(gin::Arguments* args) {
base::Value::Dict value;
base::Value::Dict dict_value;
if (!args->GetNext(&value)) {
if (!args->GetNext(&dict_value)) {
args->ThrowError();
return;
}
@try {
NSDictionary* dict = DictionaryValueToNSDictionary(std::move(value));
NSDictionary* dict = DictionaryValueToNSDictionary(std::move(dict_value));
for (id key in dict) {
id value = [dict objectForKey:key];
if ([value isKindOfClass:[NSNull class]] || value == nil) {

View file

@ -598,18 +598,13 @@ PrefService* GetPrefService(content::WebContents* web_contents) {
std::map<std::string, std::string> GetAddedFileSystemPaths(
content::WebContents* web_contents) {
auto* pref_service = GetPrefService(web_contents);
const base::Value* file_system_paths_value =
pref_service->GetDictionary(prefs::kDevToolsFileSystemPaths);
const base::Value::Dict& file_system_paths =
pref_service->GetDict(prefs::kDevToolsFileSystemPaths);
std::map<std::string, std::string> result;
if (file_system_paths_value) {
const base::DictionaryValue* file_system_paths_dict;
file_system_paths_value->GetAsDictionary(&file_system_paths_dict);
for (auto it : file_system_paths_dict->DictItems()) {
std::string type =
it.second.is_string() ? it.second.GetString() : std::string();
result[it.first] = type;
}
for (auto it : file_system_paths) {
std::string type =
it.second.is_string() ? it.second.GetString() : std::string();
result[it.first] = type;
}
return result;
}

View file

@ -417,8 +417,8 @@ v8::Local<v8::Promise> Browser::DockShow(v8::Isolate* isolate) {
dispatch_time_t one_ms = dispatch_time(DISPATCH_TIME_NOW, USEC_PER_SEC);
dispatch_after(one_ms, dispatch_get_main_queue(), ^{
TransformProcessType(&psn, kProcessTransformToForegroundApplication);
dispatch_time_t one_ms = dispatch_time(DISPATCH_TIME_NOW, USEC_PER_SEC);
dispatch_after(one_ms, dispatch_get_main_queue(), ^{
dispatch_time_t one_ms_2 = dispatch_time(DISPATCH_TIME_NOW, USEC_PER_SEC);
dispatch_after(one_ms_2, dispatch_get_main_queue(), ^{
[[NSRunningApplication currentApplication]
activateWithOptions:NSApplicationActivateIgnoringOtherApps];
p.Resolve();

View file

@ -1838,6 +1838,7 @@ void BindBadgeServiceForServiceWorker(
void ElectronBrowserClient::RegisterBrowserInterfaceBindersForServiceWorker(
content::BrowserContext* browser_context,
const content::ServiceWorkerVersionBaseInfo& service_worker_version_info,
mojo::BinderMapWithContext<const content::ServiceWorkerVersionBaseInfo&>*
map) {
map->Add<blink::mojom::BadgeService>(

View file

@ -84,6 +84,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
mojo::BinderMapWithContext<content::RenderFrameHost*>* map) override;
void RegisterBrowserInterfaceBindersForServiceWorker(
content::BrowserContext* browser_context,
const content::ServiceWorkerVersionBaseInfo& service_worker_version_info,
mojo::BinderMapWithContext<const content::ServiceWorkerVersionBaseInfo&>*
map) override;
#if BUILDFLAG(IS_LINUX)

View file

@ -219,7 +219,7 @@ void ElectronBrowserContext::InitPrefs() {
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
base::Value::List current_dictionaries =
prefs()->GetValueList(spellcheck::prefs::kSpellCheckDictionaries).Clone();
prefs()->GetList(spellcheck::prefs::kSpellCheckDictionaries).Clone();
// No configured dictionaries, the default will be en-US
if (current_dictionaries.empty()) {
std::string default_code = spellcheck::GetCorrespondingSpellCheckLanguage(

View file

@ -80,6 +80,7 @@
#include "ui/gtk/gtk_util.h" // nogncheck
#include "ui/linux/linux_ui.h"
#include "ui/linux/linux_ui_factory.h"
#include "ui/linux/linux_ui_getter.h"
#include "ui/ozone/public/ozone_platform.h"
#endif
@ -115,6 +116,20 @@ namespace electron {
namespace {
#if BUILDFLAG(IS_LINUX)
class LinuxUiGetterImpl : public ui::LinuxUiGetter {
public:
LinuxUiGetterImpl() = default;
~LinuxUiGetterImpl() override = default;
ui::LinuxUiTheme* GetForWindow(aura::Window* window) override {
return GetForProfile(nullptr);
}
ui::LinuxUiTheme* GetForProfile(Profile* profile) override {
return ui::GetLinuxUiTheme(ui::SystemTheme::kGtk);
}
};
#endif
template <typename T>
void Erase(T* container, typename T::iterator iter) {
container->erase(iter);
@ -384,6 +399,8 @@ void ElectronBrowserMainParts::PostDestroyThreads() {
void ElectronBrowserMainParts::ToolkitInitialized() {
#if BUILDFLAG(IS_LINUX)
auto* linux_ui = ui::GetDefaultLinuxUi();
CHECK(linux_ui);
linux_ui_getter_ = std::make_unique<LinuxUiGetterImpl>();
// Try loading gtk symbols used by Electron.
electron::InitializeElectron_gtk(gtk::GetLibGtk());
@ -403,7 +420,9 @@ void ElectronBrowserMainParts::ToolkitInitialized() {
// Update the native theme when GTK theme changes. The GetNativeTheme
// here returns a NativeThemeGtk, which monitors GTK settings.
dark_theme_observer_ = std::make_unique<DarkThemeObserver>();
linux_ui->GetNativeTheme()->AddObserver(dark_theme_observer_.get());
auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(nullptr);
CHECK(linux_ui_theme);
linux_ui_theme->GetNativeTheme()->AddObserver(dark_theme_observer_.get());
ui::LinuxUi::SetInstance(linux_ui);
// Cursor theme changes are tracked by LinuxUI (via a CursorThemeManager

View file

@ -40,6 +40,10 @@ namespace device {
class GeolocationManager;
}
namespace ui {
class LinuxUiGetter;
}
namespace electron {
class Browser;
@ -147,6 +151,8 @@ class ElectronBrowserMainParts : public content::BrowserMainParts {
#if BUILDFLAG(IS_LINUX)
// Used to notify the native theme of changes to dark mode.
std::unique_ptr<DarkThemeObserver> dark_theme_observer_;
std::unique_ptr<ui::LinuxUiGetter> linux_ui_getter_;
#endif
std::unique_ptr<views::LayoutProvider> layout_provider_;

View file

@ -21,12 +21,12 @@ content::RenderFrameHost* ElectronPDFWebContentsHelperClient::FindPdfFrame(
}
void ElectronPDFWebContentsHelperClient::UpdateContentRestrictions(
content::WebContents* contents,
content::RenderFrameHost* render_frame_host,
int content_restrictions) {}
void ElectronPDFWebContentsHelperClient::OnPDFHasUnsupportedFeature(
content::WebContents* contents) {}
void ElectronPDFWebContentsHelperClient::OnSaveURL(
content::WebContents* contents) {}
void ElectronPDFWebContentsHelperClient::SetPluginCanSave(
content::WebContents* contents,
content::RenderFrameHost* render_frame_host,
bool can_save) {}

View file

@ -20,11 +20,12 @@ class ElectronPDFWebContentsHelperClient
// pdf::PDFWebContentsHelperClient
content::RenderFrameHost* FindPdfFrame(
content::WebContents* contents) override;
void UpdateContentRestrictions(content::WebContents* contents,
void UpdateContentRestrictions(content::RenderFrameHost* render_frame_host,
int content_restrictions) override;
void OnPDFHasUnsupportedFeature(content::WebContents* contents) override;
void OnSaveURL(content::WebContents* contents) override;
void SetPluginCanSave(content::WebContents* contents, bool can_save) override;
void SetPluginCanSave(content::RenderFrameHost* render_frame_host,
bool can_save) override;
};
#endif // ELECTRON_SHELL_BROWSER_ELECTRON_PDF_WEB_CONTENTS_HELPER_CLIENT_H_

View file

@ -33,7 +33,7 @@ namespace extensions {
namespace {
void AddStringsForPdf(base::DictionaryValue* dict) {
void AddStringsForPdf(base::Value::Dict* dict) {
#if BUILDFLAG(ENABLE_PDF)
static constexpr webui::LocalizedString kPdfResources[] = {
{"passwordDialogTitle", IDS_PDF_PASSWORD_DIALOG_TITLE},
@ -55,16 +55,16 @@ void AddStringsForPdf(base::DictionaryValue* dict) {
{"tooltipZoomOut", IDS_PDF_TOOLTIP_ZOOM_OUT},
};
for (const auto& resource : kPdfResources)
dict->SetString(resource.name, l10n_util::GetStringUTF16(resource.id));
dict->Set(resource.name, l10n_util::GetStringUTF16(resource.id));
dict->SetString("presetZoomFactors", zoom::GetPresetZoomFactorsAsJSON());
dict->Set("presetZoomFactors", zoom::GetPresetZoomFactorsAsJSON());
#endif // BUILDFLAG(ENABLE_PDF)
}
void AddAdditionalDataForPdf(base::DictionaryValue* dict) {
void AddAdditionalDataForPdf(base::Value::Dict* dict) {
#if BUILDFLAG(ENABLE_PDF)
dict->SetKey("pdfAnnotationsEnabled", base::Value(false));
dict->SetKey("printingEnabled", base::Value(true));
dict->Set("pdfAnnotationsEnabled", base::Value(false));
dict->Set("printingEnabled", base::Value(true));
#endif // BUILDFLAG(ENABLE_PDF)
}
@ -81,14 +81,14 @@ ResourcesPrivateGetStringsFunction::~ResourcesPrivateGetStringsFunction() =
ExtensionFunction::ResponseAction ResourcesPrivateGetStringsFunction::Run() {
std::unique_ptr<get_strings::Params> params(
get_strings::Params::Create(args()));
auto dict = std::make_unique<base::DictionaryValue>();
base::Value::Dict dict;
api::resources_private::Component component = params->component;
switch (component) {
case api::resources_private::COMPONENT_PDF:
AddStringsForPdf(dict.get());
AddAdditionalDataForPdf(dict.get());
AddStringsForPdf(&dict);
AddAdditionalDataForPdf(&dict);
break;
case api::resources_private::COMPONENT_IDENTITY:
NOTREACHED();
@ -99,10 +99,9 @@ ExtensionFunction::ResponseAction ResourcesPrivateGetStringsFunction::Run() {
}
const std::string& app_locale = g_browser_process->GetApplicationLocale();
webui::SetLoadTimeDataDefaults(app_locale, dict.get());
webui::SetLoadTimeDataDefaults(app_locale, &dict);
return RespondNow(
OneArgument(base::Value::FromUniquePtrValue(std::move(dict))));
return RespondNow(WithArguments(std::move(dict)));
}
} // namespace extensions

View file

@ -188,8 +188,7 @@ ExtensionFunction::ResponseAction TabsReloadFunction::Run() {
EXTENSION_FUNCTION_VALIDATE(params.get());
bool bypass_cache = false;
if (params->reload_properties.get() &&
params->reload_properties->bypass_cache) {
if (params->reload_properties && params->reload_properties->bypass_cache) {
bypass_cache = *params->reload_properties->bypass_cache;
}

View file

@ -33,13 +33,13 @@ ElectronComponentExtensionResourceManager::
AddComponentResourceEntries(kPdfResources, kPdfResourcesSize);
// Register strings for the PDF viewer, so that $i18n{} replacements work.
base::Value pdf_strings(base::Value::Type::DICTIONARY);
base::Value::Dict pdf_strings;
pdf_extension_util::AddStrings(
pdf_extension_util::PdfViewerContext::kPdfViewer, &pdf_strings);
pdf_extension_util::AddAdditionalData(true, &pdf_strings);
ui::TemplateReplacements pdf_viewer_replacements;
ui::TemplateReplacementsFromDictionaryValue(pdf_strings.GetDict(),
ui::TemplateReplacementsFromDictionaryValue(pdf_strings,
&pdf_viewer_replacements);
extension_template_replacements_[extension_misc::kPdfExtensionId] =
std::move(pdf_viewer_replacements);

View file

@ -120,6 +120,29 @@ BrowserContext* ElectronExtensionsBrowserClient::GetOriginalContext(
}
}
content::BrowserContext*
ElectronExtensionsBrowserClient::GetRedirectedContextInIncognito(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) {
return GetOriginalContext(context);
}
content::BrowserContext*
ElectronExtensionsBrowserClient::GetContextForRegularAndIncognito(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) {
return context;
}
content::BrowserContext* ElectronExtensionsBrowserClient::GetRegularProfile(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) {
return context->IsOffTheRecord() ? nullptr : context;
}
bool ElectronExtensionsBrowserClient::IsGuestSession(
BrowserContext* context) const {
return false;

View file

@ -56,6 +56,18 @@ class ElectronExtensionsBrowserClient
content::BrowserContext* context) override;
content::BrowserContext* GetOriginalContext(
content::BrowserContext* context) override;
content::BrowserContext* GetRedirectedContextInIncognito(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) override;
content::BrowserContext* GetContextForRegularAndIncognito(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) override;
content::BrowserContext* GetRegularProfile(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) override;
bool IsGuestSession(content::BrowserContext* context) const override;
bool IsExtensionIncognitoEnabled(
const std::string& extension_id,

View file

@ -9,6 +9,7 @@
#include "base/callback.h"
#include "base/logging.h"
#include "base/values.h"
#include "build/build_config.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/browser_context.h"
@ -50,7 +51,7 @@ absl::optional<base::Value::Dict> ElectronMessagingDelegate::MaybeGetTabInfo(
tab.url = api_contents->GetURL().spec();
tab.title = base::UTF16ToUTF8(api_contents->GetTitle());
tab.audible = api_contents->IsCurrentlyAudible();
return std::move(tab.ToValue()->GetDict());
return tab.ToValue();
}
}
return absl::nullopt;

View file

@ -200,7 +200,7 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
scoped_refptr<content::FileSelectListener> listener_;
// Dialog box used for choosing files to upload from file form fields.
scoped_refptr<ui::SelectFileDialog> select_file_dialog_;
std::unique_ptr<ui::SelectFileDialog> select_file_dialog_;
std::unique_ptr<ui::SelectFileDialog::FileTypeInfo> select_file_types_;
// The type of file dialog last shown. This is SELECT_NONE if an

View file

@ -11,6 +11,7 @@
#include <vector>
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/system/data_pipe_producer.h"
#include "services/network/public/mojom/url_loader.mojom.h"

View file

@ -343,11 +343,11 @@ static base::scoped_nsobject<NSMenu> recentDocumentsMenuSwap_;
if (role == u"services") {
std::u16string title = u"Services";
NSString* label = l10n_util::FixUpWindowsStyleLabel(title);
NSString* sub_label = l10n_util::FixUpWindowsStyleLabel(title);
[item setTarget:nil];
[item setAction:nil];
NSMenu* submenu = [[[NSMenu alloc] initWithTitle:label] autorelease];
NSMenu* submenu = [[[NSMenu alloc] initWithTitle:sub_label] autorelease];
[item setSubmenu:submenu];
[NSApp setServicesMenu:submenu];
} else if (role == u"sharemenu") {

View file

@ -573,10 +573,10 @@ void InspectableWebContents::LoadCompleted() {
SetIsDocked(DispatchCallback(), false);
} else {
if (dock_state_.empty()) {
const base::Value* prefs =
pref_service_->GetDictionary(kDevToolsPreferences);
const base::Value::Dict& prefs =
pref_service_->GetDict(kDevToolsPreferences);
const std::string* current_dock_state =
prefs->FindStringKey("currentDockState");
prefs.FindString("currentDockState");
base::RemoveChars(*current_dock_state, "\"", &dock_state_);
}
std::u16string javascript = base::UTF8ToUTF16(
@ -857,14 +857,13 @@ void InspectableWebContents::SendJsonRequest(DispatchCallback callback,
}
void InspectableWebContents::GetPreferences(DispatchCallback callback) {
const base::Value* prefs = pref_service_->GetDictionary(kDevToolsPreferences);
std::move(callback).Run(prefs);
const base::Value& prefs = pref_service_->GetValue(kDevToolsPreferences);
std::move(callback).Run(&prefs);
}
void InspectableWebContents::GetPreference(DispatchCallback callback,
const std::string& name) {
if (auto* pref =
pref_service_->GetDictionary(kDevToolsPreferences)->FindKey(name)) {
if (auto* pref = pref_service_->GetDict(kDevToolsPreferences).Find(name)) {
std::move(callback).Run(pref);
return;
}

View file

@ -67,7 +67,8 @@ const char ClientFrameViewLinux::kViewClassName[] = "ClientFrameView";
ClientFrameViewLinux::ClientFrameViewLinux()
: theme_(ui::NativeTheme::GetInstanceForNativeUi()),
nav_button_provider_(ui::LinuxUi::instance()->CreateNavButtonProvider()),
nav_button_provider_(
ui::LinuxUiTheme::GetForProfile(nullptr)->CreateNavButtonProvider()),
nav_buttons_{
NavButton{ui::NavButtonProvider::FrameButtonDisplayType::kClose,
views::FrameButton::kClose, &views::Widget::Close,
@ -103,14 +104,14 @@ ClientFrameViewLinux::ClientFrameViewLinux()
native_theme_observer_.Observe(theme_);
if (ui::LinuxUi* ui = ui::LinuxUi::instance()) {
if (ui::LinuxUiTheme* ui = ui::LinuxUiTheme::GetForProfile(nullptr)) {
ui->AddWindowButtonOrderObserver(this);
OnWindowButtonOrderingChange();
}
}
ClientFrameViewLinux::~ClientFrameViewLinux() {
if (ui::LinuxUi* ui = ui::LinuxUi::instance())
if (ui::LinuxUiTheme* ui = ui::LinuxUiTheme::GetForProfile(nullptr))
ui->RemoveWindowButtonOrderObserver(this);
theme_->RemoveObserver(this);
}
@ -130,8 +131,9 @@ void ClientFrameViewLinux::Init(NativeWindowViews* window,
window->GetAcceleratedWidget()));
host_supports_client_frame_shadow_ = tree_host->SupportsClientFrameShadow();
frame_provider_ = ui::LinuxUi::instance()->GetWindowFrameProvider(
!host_supports_client_frame_shadow_, frame_->IsMaximized());
frame_provider_ =
ui::LinuxUiTheme::GetForProfile(nullptr)->GetWindowFrameProvider(
!host_supports_client_frame_shadow_, frame_->IsMaximized());
UpdateWindowTitle();
@ -274,8 +276,9 @@ void ClientFrameViewLinux::Layout() {
return;
}
frame_provider_ = ui::LinuxUi::instance()->GetWindowFrameProvider(
!host_supports_client_frame_shadow_, frame_->IsMaximized());
frame_provider_ =
ui::LinuxUiTheme::GetForProfile(nullptr)->GetWindowFrameProvider(
!host_supports_client_frame_shadow_, frame_->IsMaximized());
UpdateButtonImages();
LayoutButtons();

View file

@ -130,10 +130,10 @@ class ClientFrameViewLinux : public FramelessView,
base::ScopedObservation<ui::NativeTheme, ui::NativeThemeObserver>
native_theme_observer_{this};
base::ScopedObservation<ui::LinuxUi,
base::ScopedObservation<ui::LinuxUiTheme,
ui::WindowButtonOrderObserver,
&ui::LinuxUi::AddWindowButtonOrderObserver,
&ui::LinuxUi::RemoveWindowButtonOrderObserver>
&ui::LinuxUiTheme::AddWindowButtonOrderObserver,
&ui::LinuxUiTheme::RemoveWindowButtonOrderObserver>
window_button_order_observer_{this};
base::CallbackListSubscription paint_as_active_changed_subscription_;

View file

@ -34,18 +34,19 @@ bool MonitorHasAutohideTaskbarForEdge(UINT edge, HMONITOR monitor) {
HWND taskbar = reinterpret_cast<HWND>(
SHAppBarMessage(ABM_GETAUTOHIDEBAR, &taskbar_data));
if (!::IsWindow(taskbar)) {
APPBARDATA taskbar_data = {sizeof(APPBARDATA), 0, 0, 0};
unsigned int taskbar_state = SHAppBarMessage(ABM_GETSTATE, &taskbar_data);
APPBARDATA new_taskbar_data = {sizeof(APPBARDATA), 0, 0, 0};
unsigned int taskbar_state =
SHAppBarMessage(ABM_GETSTATE, &new_taskbar_data);
if (!(taskbar_state & ABS_AUTOHIDE))
return false;
taskbar_data.hWnd = ::FindWindow(L"Shell_TrayWnd", NULL);
if (!::IsWindow(taskbar_data.hWnd))
new_taskbar_data.hWnd = ::FindWindow(L"Shell_TrayWnd", NULL);
if (!::IsWindow(new_taskbar_data.hWnd))
return false;
SHAppBarMessage(ABM_GETTASKBARPOS, &taskbar_data);
if (taskbar_data.uEdge == edge)
taskbar = taskbar_data.hWnd;
SHAppBarMessage(ABM_GETTASKBARPOS, &new_taskbar_data);
if (new_taskbar_data.uEdge == edge)
taskbar = new_taskbar_data.hWnd;
}
// There is a potential race condition here:

View file

@ -54,8 +54,8 @@ void SubmenuButton::SetUnderlineColor(SkColor color) {
}
void SubmenuButton::GetAccessibleNodeData(ui::AXNodeData* node_data) {
node_data->SetName(GetAccessibleName());
node_data->role = ax::mojom::Role::kPopUpButton;
node_data->SetName(GetAccessibleName());
}
void SubmenuButton::PaintButtonContents(gfx::Canvas* canvas) {

View file

@ -64,7 +64,7 @@ void ZoomLevelDelegate::SetDefaultZoomLevelPref(double level) {
double ZoomLevelDelegate::GetDefaultZoomLevelPref() const {
const base::Value::Dict& default_zoom_level_dictionary =
pref_service_->GetValueDict(kPartitionDefaultZoomLevel);
pref_service_->GetDict(kPartitionDefaultZoomLevel);
// If no default has been previously set, the default returned is the
// value used to initialize default_zoom_level in this function.
return default_zoom_level_dictionary.FindDouble(partition_key_).value_or(0.0);
@ -147,7 +147,7 @@ void ZoomLevelDelegate::InitHostZoomMap(content::HostZoomMap* host_zoom_map) {
// Initialize the HostZoomMap with per-host zoom levels from the persisted
// zoom-level preference values.
const base::Value::Dict& host_zoom_dictionaries =
pref_service_->GetValueDict(kPartitionPerHostZoomLevels);
pref_service_->GetDict(kPartitionPerHostZoomLevels);
const base::Value::Dict* host_zoom_dictionary =
host_zoom_dictionaries.FindDict(partition_key_);
if (host_zoom_dictionary) {