Index: chrome/common/extensions/extension.cc |
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc |
index b4824c9448d14f09ada3ad602ce3406e31a231e3..287aa4c97f6c0f559744a527e1fb0d986f7785b9 100644 |
--- a/chrome/common/extensions/extension.cc |
+++ b/chrome/common/extensions/extension.cc |
@@ -468,7 +468,7 @@ bool Extension::IdIsValid(const std::string& id) { |
std::string Extension::GenerateIdForPath(const FilePath& path) { |
FilePath new_path = Extension::MaybeNormalizePath(path); |
std::string id; |
- if (!GenerateId(WideToUTF8(new_path.ToWStringHack()), &id)) |
+ if (!GenerateId(UTF16ToUTF8(new_path.LossyDisplayName()), &id)) |
Mark Mentovai
2011/02/01 22:54:55
Not for display?
|
return ""; |
return id; |
} |
@@ -1244,8 +1244,7 @@ void Extension::DecodeIconFromPath(const FilePath& icon_path, |
std::string file_contents; |
if (!file_util::ReadFileToString(icon_path, &file_contents)) { |
- LOG(ERROR) << "Could not read icon file: " |
- << WideToUTF8(icon_path.ToWStringHack()); |
+ LOG(ERROR) << "Could not read icon file: " << icon_path.LossyDisplayName(); |
return; |
} |
@@ -1257,7 +1256,7 @@ void Extension::DecodeIconFromPath(const FilePath& icon_path, |
*decoded = decoder.Decode(data, file_contents.length()); |
if (decoded->empty()) { |
LOG(ERROR) << "Could not decode icon file: " |
- << WideToUTF8(icon_path.ToWStringHack()); |
+ << icon_path.LossyDisplayName(); |
return; |
} |