win: Fix tests and compilation errors

This commit is contained in:
Cheng Zhao 2015-03-18 12:55:44 +08:00
parent b43386b273
commit 57812616b9
6 changed files with 13 additions and 32 deletions

View file

@ -29,8 +29,8 @@ namespace {
// is empty. This function tells if it is.
bool ValidateShellCommandForScheme(const std::string& scheme) {
base::win::RegKey key;
std::wstring registry_path = base::ASCIIToWide(scheme) +
L"\\shell\\open\\command";
base::string16 registry_path = base::ASCIIToUTF16(scheme) +
L"\\shell\\open\\command";
key.Open(HKEY_CLASSES_ROOT, registry_path.c_str(), KEY_READ);
if (!key.Valid())
return false;