refactor: replace deprecated base::Value::Set<Type>Key usage (#37570)
Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
parent
061e2e5e73
commit
6dc46e5bcf
5 changed files with 52 additions and 62 deletions
|
@ -389,28 +389,23 @@ void WebContentsPreferences::AppendCommandLineSwitches(
|
|||
}
|
||||
|
||||
void WebContentsPreferences::SaveLastPreferences() {
|
||||
last_web_preferences_ = base::Value(base::Value::Type::DICT);
|
||||
last_web_preferences_.SetKey(options::kNodeIntegration,
|
||||
base::Value(node_integration_));
|
||||
last_web_preferences_.SetKey(options::kNodeIntegrationInSubFrames,
|
||||
base::Value(node_integration_in_sub_frames_));
|
||||
last_web_preferences_.SetKey(options::kSandbox, base::Value(IsSandboxed()));
|
||||
last_web_preferences_.SetKey(options::kContextIsolation,
|
||||
base::Value(context_isolation_));
|
||||
last_web_preferences_.SetKey(options::kJavaScript, base::Value(javascript_));
|
||||
last_web_preferences_.SetKey(options::kEnableWebSQL,
|
||||
base::Value(enable_websql_));
|
||||
last_web_preferences_.SetKey(options::kWebviewTag, base::Value(webview_tag_));
|
||||
last_web_preferences_.SetKey("disablePopups", base::Value(disable_popups_));
|
||||
last_web_preferences_.SetKey(options::kWebSecurity,
|
||||
base::Value(web_security_));
|
||||
last_web_preferences_.SetKey(options::kAllowRunningInsecureContent,
|
||||
base::Value(allow_running_insecure_content_));
|
||||
last_web_preferences_.SetKey(options::kExperimentalFeatures,
|
||||
base::Value(experimental_features_));
|
||||
last_web_preferences_.SetKey(
|
||||
options::kEnableBlinkFeatures,
|
||||
base::Value(enable_blink_features_.value_or("")));
|
||||
base::Value::Dict dict;
|
||||
dict.Set(options::kNodeIntegration, node_integration_);
|
||||
dict.Set(options::kNodeIntegrationInSubFrames,
|
||||
node_integration_in_sub_frames_);
|
||||
dict.Set(options::kSandbox, IsSandboxed());
|
||||
dict.Set(options::kContextIsolation, context_isolation_);
|
||||
dict.Set(options::kJavaScript, javascript_);
|
||||
dict.Set(options::kEnableWebSQL, enable_websql_);
|
||||
dict.Set(options::kWebviewTag, webview_tag_);
|
||||
dict.Set("disablePopups", disable_popups_);
|
||||
dict.Set(options::kWebSecurity, web_security_);
|
||||
dict.Set(options::kAllowRunningInsecureContent,
|
||||
allow_running_insecure_content_);
|
||||
dict.Set(options::kExperimentalFeatures, experimental_features_);
|
||||
dict.Set(options::kEnableBlinkFeatures, enable_blink_features_.value_or(""));
|
||||
|
||||
last_web_preferences_ = base::Value(std::move(dict));
|
||||
}
|
||||
|
||||
void WebContentsPreferences::OverrideWebkitPrefs(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue