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

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: REBASE 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
« no previous file with comments | « remoting/base/resources_mac.cc ('k') | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle.h
diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h
index 8fd932ad10d4a82ce95761beafb52cd7ab072dc1..f5308e4154dda76467f4a715779f5063c2bd7e56 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.
« no previous file with comments | « remoting/base/resources_mac.cc ('k') | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698