mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
2757472: Reland "Reland "[LSC] Remove base::string16 alias""
https://chromium-review.googlesource.com/c/chromium/src/+/2757472
This commit is contained in:
@@ -156,7 +156,7 @@ bool NativeImage::TryConvertNativeImage(v8::Isolate* isolate,
|
||||
*native_image = NativeImage::CreateFromPath(isolate, icon_path).get();
|
||||
if ((*native_image)->image().IsEmpty()) {
|
||||
#if defined(OS_WIN)
|
||||
const auto img_path = base::UTF16ToUTF8(icon_path.value());
|
||||
const auto img_path = base::WideToUTF8(icon_path.value());
|
||||
#else
|
||||
const auto img_path = icon_path.value();
|
||||
#endif
|
||||
|
||||
@@ -37,7 +37,7 @@ v8::Local<v8::Promise> NativeImage::CreateThumbnailFromPath(
|
||||
|
||||
// create an IShellItem
|
||||
Microsoft::WRL::ComPtr<IShellItem> pItem;
|
||||
std::wstring image_path = path.AsUTF16Unsafe();
|
||||
std::wstring image_path = path.value();
|
||||
hr = SHCreateItemFromParsingName(image_path.c_str(), nullptr,
|
||||
IID_PPV_ARGS(&pItem));
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ bool WriteShortcutLink(const base::FilePath& shortcut_path,
|
||||
|
||||
base::win::ShortcutProperties properties;
|
||||
base::FilePath path;
|
||||
std::u16string str;
|
||||
std::wstring str;
|
||||
UUID toastActivatorClsid;
|
||||
int index;
|
||||
if (options.Get("target", &path))
|
||||
|
||||
Reference in New Issue
Block a user