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..2a0b558c8d806db3adc23612e2553c37211b21c4 100644 |
--- a/ui/base/resource/resource_bundle.h |
+++ b/ui/base/resource/resource_bundle.h |
@@ -142,12 +142,16 @@ class UI_BASE_EXPORT ResourceBundle { |
// Initialize the ResourceBundle using given data pack path for testing. |
static void InitSharedInstanceWithPakPath(const base::FilePath& path); |
+ // Initialize the ResourceBundle using data pack from given buffer. |
sky
2016/05/19 20:25:54
Also document lifetime here.
altimin
2016/05/19 23:04:48
Done.
|
+ static void InitSharedInstanceWithPakBuffer(base::StringPiece buffer); |
sky
2016/05/19 20:25:54
I dislike exposing functions in the public class t
altimin
2016/05/19 23:04:47
Actually, this is not test-only function. InitShar
sky
2016/05/20 15:49:04
Content shell is primarily there for tests, and no
|
+ |
// Delete the ResourceBundle for this process if it exists. |
static void CleanupSharedInstance(); |
// Returns true after the global resource loader instance has been created. |
static bool HasSharedInstance(); |
+ // Initialize the ResourceBundle using data pack from given buffer. |
// Return the global resource loader instance. |
static ResourceBundle& GetSharedInstance(); |
@@ -356,6 +360,10 @@ class UI_BASE_EXPORT ResourceBundle { |
void LoadTestResources(const base::FilePath& path, |
const base::FilePath& locale_path); |
+ // Load test resources from given buffers. |
+ void LoadTestResourcesFromBuffer(base::StringPiece data, |
+ base::StringPiece locale_data); |
+ |
// Unload the locale specific strings and prepares to load new ones. See |
// comments for ReloadLocaleResources(). |
void UnloadLocaleResources(); |