Chromium Code Reviews| 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. |
| + static void InitSharedInstanceWithPakBuffer(base::StringPiece buffer); |
|
alex clarke (OOO till 29th)
2016/05/12 17:31:04
Is base::StringPiece the right type? It's a binar
altimin
2016/05/12 18:07:53
It's the most appropriate type, it seems. Also, Da
|
| + |
| // 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(); |