refactor: remove unused web contents preferences methods (#42947)

* chore: remove unused WebContentsPreferences::ShouldDisableDialogs()

* chore: remove unused WebContentsPreferences::ShouldUseSafeDialogs()

caller removed in 85bc005c

* chore: remove unused WebContentsPreferences::GetSafeDialogsMessage()

caller removed in 85bc005c

* refactor: WebContentsPreferences::GetPreloadPath() now returns a std::optional<base::FilePath>

* refactor: make WebContentsPreferences::last_preference() const
This commit is contained in:
Charles Kerr 2024-07-19 12:26:57 -05:00 committed by GitHub
parent 5b7ed6097e
commit 7a101a1c4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 25 deletions

View file

@ -258,14 +258,6 @@ void WebContentsPreferences::SetFromDictionary(
SaveLastPreferences();
}
bool WebContentsPreferences::GetSafeDialogsMessage(std::string* message) const {
if (safe_dialogs_message_) {
*message = *safe_dialogs_message_;
return true;
}
return false;
}
bool WebContentsPreferences::SetImageAnimationPolicy(std::string policy) {
if (policy == "animate") {
image_animation_policy_ =
@ -283,15 +275,6 @@ bool WebContentsPreferences::SetImageAnimationPolicy(std::string policy) {
return false;
}
bool WebContentsPreferences::GetPreloadPath(base::FilePath* path) const {
DCHECK(path);
if (preload_path_) {
*path = *preload_path_;
return true;
}
return false;
}
bool WebContentsPreferences::IsSandboxed() const {
if (sandbox_)
return *sandbox_;