summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/data_pack.cc4
-rw-r--r--base/data_pack.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/base/data_pack.cc b/base/data_pack.cc
index 4e5a569..06f2308 100644
--- a/base/data_pack.cc
+++ b/base/data_pack.cc
@@ -96,7 +96,7 @@ bool DataPack::Load(const FilePath& path) {
return true;
}
-bool DataPack::GetStringPiece(uint32 resource_id, StringPiece* data) {
+bool DataPack::GetStringPiece(uint32 resource_id, StringPiece* data) const {
// It won't be hard to make this endian-agnostic, but it's not worth
// bothering to do right now.
#if defined(__BYTE_ORDER)
@@ -119,7 +119,7 @@ bool DataPack::GetStringPiece(uint32 resource_id, StringPiece* data) {
return true;
}
-RefCountedStaticMemory* DataPack::GetStaticMemory(uint32 resource_id) {
+RefCountedStaticMemory* DataPack::GetStaticMemory(uint32 resource_id) const {
base::StringPiece piece;
if (!GetStringPiece(resource_id, &piece))
return NULL;
diff --git a/base/data_pack.h b/base/data_pack.h
index 8938491..f3f8481 100644
--- a/base/data_pack.h
+++ b/base/data_pack.h
@@ -35,12 +35,12 @@ 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 resource_id, StringPiece* data);
+ bool GetStringPiece(uint32 resource_id, StringPiece* data) const;
// 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 resource_id);
+ RefCountedStaticMemory* GetStaticMemory(uint32 resource_id) const;
// Writes a pack file containing |resources| to |path|.
static bool WritePack(const FilePath& path,