Index: base/data_pack.h |
diff --git a/base/data_pack.h b/base/data_pack.h |
index 7c9abde941e25ace46890b14da027e0d072fc55c..893849141003536fc1cfd905d5419bf9c9d9bed5 100644 |
--- a/base/data_pack.h |
+++ b/base/data_pack.h |
@@ -9,6 +9,8 @@ |
#ifndef BASE_DATA_PACK_H_ |
#define BASE_DATA_PACK_H_ |
+#include <map> |
+ |
#include "base/basictypes.h" |
#include "base/ref_counted_memory.h" |
#include "base/scoped_ptr.h" |
@@ -33,12 +35,16 @@ class DataPack { |
// Get resource by id |resource_id|, filling in |data|. |
// The data is owned by the DataPack object and should not be modified. |
// Returns false if the resource id isn't found. |
- bool GetStringPiece(uint32_t resource_id, StringPiece* data); |
+ bool GetStringPiece(uint32 resource_id, StringPiece* data); |
// Like GetStringPiece(), but returns a reference to memory. This interface |
// is used for image data, while the StringPiece interface is usually used |
// for localization strings. |
- RefCountedStaticMemory* GetStaticMemory(uint32_t resource_id); |
+ RefCountedStaticMemory* GetStaticMemory(uint32 resource_id); |
+ |
+ // Writes a pack file containing |resources| to |path|. |
+ static bool WritePack(const FilePath& path, |
+ const std::map<uint32, StringPiece>& resources); |
private: |
// The memory-mapped data. |