From 06bec58fd31071ab8acf17c4658b1a785140c0c1 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 3 Mar 2022 10:36:41 -0800 Subject: [PATCH] chore: remove redundant RegisterPreference impl --- shell/browser/ui/inspectable_web_contents.cc | 12 ------------ shell/browser/ui/inspectable_web_contents.h | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/shell/browser/ui/inspectable_web_contents.cc b/shell/browser/ui/inspectable_web_contents.cc index b694d50c850eb..91014179d6929 100644 --- a/shell/browser/ui/inspectable_web_contents.cc +++ b/shell/browser/ui/inspectable_web_contents.cc @@ -853,18 +853,6 @@ void InspectableWebContents::SendJsonRequest(DispatchCallback callback, std::move(callback).Run(nullptr); } -void InspectableWebContents::RegisterPreference( - const std::string& name, - const RegisterOptions& options) { - const std::string* settings_value = - pref_service_->GetDictionary(kDevToolsPreferences)->FindStringKey(name); - if (!settings_value) - return; - - DictionaryPrefUpdate insert_update(pref_service_, kDevToolsPreferences); - insert_update.Get()->SetKey(name, base::Value(*settings_value)); -} - void InspectableWebContents::GetPreferences(DispatchCallback callback) { const base::Value* prefs = pref_service_->GetDictionary(kDevToolsPreferences); std::move(callback).Run(prefs); diff --git a/shell/browser/ui/inspectable_web_contents.h b/shell/browser/ui/inspectable_web_contents.h index d2cd133a16b20..bfc6cbae896d5 100644 --- a/shell/browser/ui/inspectable_web_contents.h +++ b/shell/browser/ui/inspectable_web_contents.h @@ -140,7 +140,7 @@ class InspectableWebContents const std::string& browser_id, const std::string& url) override; void RegisterPreference(const std::string& name, - const RegisterOptions& options) override; + const RegisterOptions& options) override {} void GetPreferences(DispatchCallback callback) override; void GetPreference(DispatchCallback callback, const std::string& name) override;