Chromium Code Reviews| Index: chrome/browser/extensions/pack_extension_job.cc |
| =================================================================== |
| --- chrome/browser/extensions/pack_extension_job.cc (revision 70263) |
| +++ chrome/browser/extensions/pack_extension_job.cc (working copy) |
| @@ -6,6 +6,7 @@ |
| #include "app/l10n_util.h" |
| #include "base/message_loop.h" |
| +#include "base/sys_string_conversions.h" |
| #include "base/utf_string_conversions.h" |
| #include "base/task.h" |
| #include "chrome/browser/extensions/extension_creator.h" |
| @@ -80,20 +81,25 @@ |
| } |
| // static |
| -std::wstring PackExtensionJob::StandardSuccessMessage(const FilePath& crx_file, |
| - const FilePath& key_file) |
| -{ |
| - // TODO(isherman): we should use string16 instead of wstring. |
| - // See crbug.com/23581 and crbug.com/24672 |
| - std::wstring message; |
| +string16 PackExtensionJob::StandardSuccessMessage(const FilePath& crx_file, |
| + const FilePath& key_file) { |
| +#if defined(OS_WIN) |
| + string16 crx_file_string = crx_file.value(); |
| + string16 key_file_string = key_file.value(); |
| +#else |
| + string16 crx_file_string = |
| + WideToUTF16(base::SysNativeMBToWide(crx_file.value())); |
|
viettrungluu
2010/12/29 19:04:15
Don't do this. Use WideToUTF16(..._file.ToWStringH
Avi (use Gerrit)
2010/12/29 19:40:49
Done.
|
| + string16 key_file_string = |
| + WideToUTF16(base::SysNativeMBToWide(key_file.value())); |
| +#endif |
| if (key_file.empty()) { |
|
viettrungluu
2010/12/29 19:04:15
key_file_string, I guess.
Avi (use Gerrit)
2010/12/29 19:40:49
Done.
|
| - return l10n_util::GetStringF( |
| + return l10n_util::GetStringFUTF16( |
| IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_UPDATE, |
| - crx_file.ToWStringHack()); |
| + crx_file_string); |
| } else { |
| - return l10n_util::GetStringF( |
| + return l10n_util::GetStringFUTF16( |
| IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_NEW, |
| - crx_file.ToWStringHack(), |
| - key_file.ToWStringHack()); |
| + crx_file_string, |
| + key_file_string); |
| } |
| } |