Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1380)

Unified Diff: chrome/browser/extensions/pack_extension_job.cc

Issue 5989012: Revert 70281 - Revert 70271 - Remove wstring from l10n_util. Part 3.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/pack_extension_job.h ('k') | chrome/browser/importer/importer_bridge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/pack_extension_job.cc
===================================================================
--- chrome/browser/extensions/pack_extension_job.cc (revision 70282)
+++ 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,18 @@
}
// 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;
- if (key_file.empty()) {
- return l10n_util::GetStringF(
+string16 PackExtensionJob::StandardSuccessMessage(const FilePath& crx_file,
+ const FilePath& key_file) {
+ string16 crx_file_string = WideToUTF16(crx_file.ToWStringHack());
+ string16 key_file_string = WideToUTF16(key_file.ToWStringHack());
+ if (key_file_string.empty()) {
+ 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);
}
}
« no previous file with comments | « chrome/browser/extensions/pack_extension_job.h ('k') | chrome/browser/importer/importer_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698