Skip to content

Commit

Permalink
chore: remove redundant RegisterPreference impl
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Mar 3, 2022
1 parent 448c526 commit e243a25
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
12 changes: 0 additions & 12 deletions shell/browser/ui/inspectable_web_contents.cc
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion shell/browser/ui/inspectable_web_contents.h
Expand Up @@ -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;
Expand Down

0 comments on commit e243a25

Please sign in to comment.