Index: ui/base/resource/resource_bundle.h |
diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h |
index 809b1125159ef939b2cbddb450b36f9f7ed57da4..9a1a904724b62b8d22b504a81e26c434d1e69055 100644 |
--- a/ui/base/resource/resource_bundle.h |
+++ b/ui/base/resource/resource_bundle.h |
@@ -245,6 +245,12 @@ class UI_BASE_EXPORT ResourceBundle { |
// loaded. Pass an empty path to undo. |
void OverrideLocalePakForTest(const base::FilePath& pak_path); |
+ // Overrides a localized string resource with the given string. If no delegate |
+ // is present, the |string| will be returned when getting the localized string |
+ // |message_id|. This is intended to be used in conjunction with field trials |
+ // and the variations service to experiment with different UI strings. |
+ void OverrideStringResource(int message_id, const base::string16& string); |
+ |
// Returns the full pathname of the locale file to load. May return an empty |
// string if no locale data files are found and |test_file_exists| is true. |
// Used on Android to load the local file in the browser process and pass it |
@@ -267,6 +273,8 @@ class UI_BASE_EXPORT ResourceBundle { |
class ResourceBundleImageSource; |
friend class ResourceBundleImageSource; |
+ typedef base::hash_map<int, base::string16> IdToStringMap; |
grt (UTC plus 2)
2014/06/11 01:51:18
#include "base/containers/hash_tables.h"
jwd
2014/07/03 17:41:31
Done.
|
+ |
// Ctor/dtor are private, since we're a singleton. |
explicit ResourceBundle(Delegate* delegate); |
~ResourceBundle(); |
@@ -391,6 +399,8 @@ class UI_BASE_EXPORT ResourceBundle { |
base::FilePath overridden_pak_path_; |
+ IdToStringMap overridden_strings_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ResourceBundle); |
}; |