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

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

Issue 1955773002: Enable MD by default on Windows for Canary/Dev and local builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't break first run Created 4 years, 7 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 df812b1f14c0791a8fa40b508da0aae44666cb61..646a6b5d7a4d3db7d06f6c0b9bb0eeac015c81bc 100644
--- a/ui/base/resource/resource_bundle.h
+++ b/ui/base/resource/resource_bundle.h
@@ -116,6 +116,22 @@ class UI_BASE_EXPORT ResourceBundle {
virtual ~Delegate() {}
};
+ // A class which is designed to be instantiated on the stack during early
+ // startup code that needs access to string resources before the
+ // ResourceBundle is loaded.
+ //
+ // This incurs a performance hit, so this should only be used in exceptional
+ // circumstances. Most uses of resources should wait until after the
+ // ResourceBundle has been loaded properly.
+ class UI_BASE_EXPORT TemporaryLoader {
+ public:
+ TemporaryLoader();
+ ~TemporaryLoader();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TemporaryLoader);
+ };
+
// Initialize the ResourceBundle for this process. Does not take ownership of
// the |delegate| value. Returns the language selected.
// NOTE: Mac ignores this and always loads up resources for the language

Powered by Google App Engine
This is Rietveld 408576698