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

Unified Diff: chrome/browser/user_data_dir_extractor_win.cc

Issue 13825003: Fix uninintialized ResourceBundle in ShowUserDataDirDialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/user_data_dir_extractor_win.cc
diff --git a/chrome/browser/user_data_dir_extractor_win.cc b/chrome/browser/user_data_dir_extractor_win.cc
index 5c4b94147f6e7f861874da86b248d27a0a7aa433..fbf94404feb6b8a83c28dfd15a892a972d1d72c9 100644
--- a/chrome/browser/user_data_dir_extractor_win.cc
+++ b/chrome/browser/user_data_dir_extractor_win.cc
@@ -14,6 +14,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "content/public/common/main_function_params.h"
+#include "ui/base/resource/resource_bundle.h"
namespace chrome {
@@ -46,6 +47,11 @@ base::FilePath GetUserDataDir(const content::MainFunctionParams& parameters) {
// TODO(beng):
NOTIMPLEMENTED();
#else
+ // Make sure ResourceBundle is initialized. The user data dialog needs to
+ // access string resources. See http://crbug.com/230432
+ if (!ResourceBundle::HasSharedInstance())
+ ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
Nico 2013/04/11 18:29:29 Is "en-US" correct? I suppose prefs::kApplicationL
hshi1 2013/04/11 20:23:19 I've added a check for command line locale switch.
+
base::FilePath new_user_data_dir =
chrome::ShowUserDataDirDialog(user_data_dir);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698