2757472: Reland "Reland "[LSC] Remove base::string16 alias""

2757472
This commit is contained in:
John Kleinschmidt 2021-03-16 12:18:45 -04:00
parent 86d23cee40
commit 22d8f22cfb
100 changed files with 417 additions and 417 deletions

View file

@ -34,8 +34,8 @@ void ElectronJavaScriptDialogManager::RunJavaScriptDialog(
content::WebContents* web_contents,
content::RenderFrameHost* rfh,
JavaScriptDialogType dialog_type,
const base::string16& message_text,
const base::string16& default_prompt_text,
const std::u16string& message_text,
const std::u16string& default_prompt_text,
DialogClosedCallback callback,
bool* did_suppress_message) {
auto origin_url = rfh->GetLastCommittedURL();
@ -50,19 +50,19 @@ void ElectronJavaScriptDialogManager::RunJavaScriptDialog(
}
if (origin_counts_[origin] == kUserWantsNoMoreDialogs) {
return std::move(callback).Run(false, base::string16());
return std::move(callback).Run(false, std::u16string());
}
if (dialog_type != JavaScriptDialogType::JAVASCRIPT_DIALOG_TYPE_ALERT &&
dialog_type != JavaScriptDialogType::JAVASCRIPT_DIALOG_TYPE_CONFIRM) {
std::move(callback).Run(false, base::string16());
std::move(callback).Run(false, std::u16string());
return;
}
auto* web_preferences = WebContentsPreferences::From(web_contents);
if (web_preferences && web_preferences->IsEnabled("disableDialogs")) {
return std::move(callback).Run(false, base::string16());
return std::move(callback).Run(false, std::u16string());
}
// No default button
@ -116,7 +116,7 @@ void ElectronJavaScriptDialogManager::RunBeforeUnloadDialog(
auto* api_web_contents = api::WebContents::From(web_contents);
if (api_web_contents) {
bool default_prevented = api_web_contents->Emit("will-prevent-unload");
std::move(callback).Run(default_prevented, base::string16());
std::move(callback).Run(default_prevented, std::u16string());
}
}
@ -131,7 +131,7 @@ void ElectronJavaScriptDialogManager::OnMessageBoxCallback(
bool checkbox_checked) {
if (checkbox_checked)
origin_counts_[origin] = kUserWantsNoMoreDialogs;
std::move(callback).Run(code == 0, base::string16());
std::move(callback).Run(code == 0, std::u16string());
}
} // namespace electron