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

Unified Diff: ui/base/resource/resource_bundle.h

Issue 457103003: Merge ResourceBundle's InitSharedInstanceLocaleOnly with InitSharedInstanceWithLocale(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 4 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
Index: ui/base/resource/resource_bundle.h
diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h
index b0e9cdb1738bf4fa6df2c116e1929eb90eff3ad4..3a3b8608ff97a5560490458c8d6106c799c34ea1 100644
--- a/ui/base/resource/resource_bundle.h
+++ b/ui/base/resource/resource_bundle.h
@@ -64,6 +64,11 @@ class UI_BASE_EXPORT ResourceBundle {
RTL_DISABLED,
};
+ enum LoadResources {
+ LOAD_COMMON_RESOURCES,
+ DO_NOT_LOAD_COMMON_RESOURCES
+ };
+
// Delegate class that allows interception of pack file loading and resource
// requests. The methods of this class may be called on multiple threads.
class Delegate {
@@ -124,13 +129,11 @@ class UI_BASE_EXPORT ResourceBundle {
// There is no way to specify which resource files are loaded, i.e. names of
// the files are hardcoded in ResourceBundle. Fix it to allow to specify which
// files are loaded (e.g. add a new method in Delegate).
+ // |load_resources| controls whether or not LoadCommonResources is called.
static std::string InitSharedInstanceWithLocale(
- const std::string& pref_locale, Delegate* delegate);
-
- // Same as InitSharedInstanceWithLocale(), but loads only localized resources,
- // without default resource packs.
- static std::string InitSharedInstanceLocaleOnly(
- const std::string& pref_locale, Delegate* delegate);
+ const std::string& pref_locale,
+ Delegate* delegate,
+ LoadResources load_resources);
// Initialize the ResourceBundle using the given file region. If |region| is
// MemoryMappedFile::Region::kWholeFile, the entire |pak_file| is used.

Powered by Google App Engine
This is Rietveld 408576698