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

@ -27,38 +27,38 @@ ElectronMenuModel::ElectronMenuModel(Delegate* delegate)
ElectronMenuModel::~ElectronMenuModel() = default;
void ElectronMenuModel::SetToolTip(int index, const base::string16& toolTip) {
void ElectronMenuModel::SetToolTip(int index, const std::u16string& toolTip) {
int command_id = GetCommandIdAt(index);
toolTips_[command_id] = toolTip;
}
base::string16 ElectronMenuModel::GetToolTipAt(int index) {
std::u16string ElectronMenuModel::GetToolTipAt(int index) {
const int command_id = GetCommandIdAt(index);
const auto iter = toolTips_.find(command_id);
return iter == std::end(toolTips_) ? base::string16() : iter->second;
return iter == std::end(toolTips_) ? std::u16string() : iter->second;
}
void ElectronMenuModel::SetRole(int index, const base::string16& role) {
void ElectronMenuModel::SetRole(int index, const std::u16string& role) {
int command_id = GetCommandIdAt(index);
roles_[command_id] = role;
}
base::string16 ElectronMenuModel::GetRoleAt(int index) {
std::u16string ElectronMenuModel::GetRoleAt(int index) {
const int command_id = GetCommandIdAt(index);
const auto iter = roles_.find(command_id);
return iter == std::end(roles_) ? base::string16() : iter->second;
return iter == std::end(roles_) ? std::u16string() : iter->second;
}
void ElectronMenuModel::SetSecondaryLabel(int index,
const base::string16& sublabel) {
const std::u16string& sublabel) {
int command_id = GetCommandIdAt(index);
sublabels_[command_id] = sublabel;
}
base::string16 ElectronMenuModel::GetSecondaryLabelAt(int index) const {
std::u16string ElectronMenuModel::GetSecondaryLabelAt(int index) const {
int command_id = GetCommandIdAt(index);
const auto iter = sublabels_.find(command_id);
return iter == std::end(sublabels_) ? base::string16() : iter->second;
return iter == std::end(sublabels_) ? std::u16string() : iter->second;
}
bool ElectronMenuModel::GetAcceleratorAtWithParams(