summaryrefslogtreecommitdiffstats
path: root/app/resource_bundle.cc
diff options
context:
space:
mode:
authorglotov@google.com <glotov@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-14 17:58:52 +0000
committerglotov@google.com <glotov@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-14 17:58:52 +0000
commit4549b0c7c309791cec499dc858609a07ae95a207 (patch)
treea74f5d1ec77227d1c903a6d3952e5c88ba8f7be7 /app/resource_bundle.cc
parent2abf2acb3ab6c5a5a1f25f8a586e4385d5f9a125 (diff)
downloadchromium_src-4549b0c7c309791cec499dc858609a07ae95a207.zip
chromium_src-4549b0c7c309791cec499dc858609a07ae95a207.tar.gz
chromium_src-4549b0c7c309791cec499dc858609a07ae95a207.tar.bz2
ReloadSharedInstance() added to change the locale on the live system.
BUG=none TEST=none Review URL: http://codereview.chromium.org/1648004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44498 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/resource_bundle.cc')
-rw-r--r--app/resource_bundle.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/app/resource_bundle.cc b/app/resource_bundle.cc
index 5ca0408..a2058ec 100644
--- a/app/resource_bundle.cc
+++ b/app/resource_bundle.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -38,7 +38,17 @@ std::string ResourceBundle::InitSharedInstance(
DCHECK(g_shared_instance_ == NULL) << "ResourceBundle initialized twice";
g_shared_instance_ = new ResourceBundle();
- return g_shared_instance_->LoadResources(pref_locale);
+ g_shared_instance_->LoadCommonResources();
+ return g_shared_instance_->LoadLocaleResources(pref_locale);
+}
+
+/* static */
+std::string ResourceBundle::ReloadSharedInstance(
+ const std::wstring& pref_locale) {
+ DCHECK(g_shared_instance_ != NULL) << "ResourceBundle not initialized";
+
+ g_shared_instance_->UnloadLocaleResources();
+ return g_shared_instance_->LoadLocaleResources(pref_locale);
}
/* static */