summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/values.cc3
-rw-r--r--base/values.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/base/values.cc b/base/values.cc
index d97da24..51e68a7 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -193,7 +193,8 @@ BinaryValue* BinaryValue::Create(char* buffer, size_t size) {
}
// static
-BinaryValue* BinaryValue::CreateWithCopiedBuffer(char* buffer, size_t size) {
+BinaryValue* BinaryValue::CreateWithCopiedBuffer(const char* buffer,
+ size_t size) {
if (!buffer)
return NULL;
diff --git a/base/values.h b/base/values.h
index 8e3669b..b3c380c 100644
--- a/base/values.h
+++ b/base/values.h
@@ -171,7 +171,7 @@ class BinaryValue: public Value {
// factory method creates a new BinaryValue by copying the contents of the
// buffer that's passed in.
// Returns NULL if buffer is NULL.
- static BinaryValue* CreateWithCopiedBuffer(char* buffer, size_t size);
+ static BinaryValue* CreateWithCopiedBuffer(const char* buffer, size_t size);
~BinaryValue();
@@ -181,6 +181,7 @@ class BinaryValue: public Value {
size_t GetSize() const { return size_; }
char* GetBuffer() { return buffer_; }
+ const char* GetBuffer() const { return buffer_; }
private:
// Constructor is private so that only objects with valid buffer pointers