Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Unified Diff: base/values.h

Issue 10700194: Represent BINARY properties using std::string instead of BinaryValue, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/serial/serial_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/values.h
diff --git a/base/values.h b/base/values.h
index f9a459e762cab6a5e9e27baf79530f699082f7bc..361a1389b398053fa742a4731a255aa3257817d4 100644
--- a/base/values.h
+++ b/base/values.h
@@ -30,6 +30,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/string16.h"
+#include "base/string_piece.h"
brettw 2012/07/13 16:46:46 I don't actually know the answer but I wonder if w
Jeffrey Yasskin 2012/07/15 04:07:24 I tend to think that StringPiece should be used ev
// This file declares "using base::Value", etc. at the bottom, so that
// current code can use these classes without the base namespace. In
@@ -188,6 +189,9 @@ class BASE_EXPORT BinaryValue: public Value {
// buffer that's passed in.
// Returns NULL if buffer is NULL.
static BinaryValue* CreateWithCopiedBuffer(const char* buffer, size_t size);
+ static BinaryValue* CreateWithCopiedBuffer(StringPiece buffer) {
+ return CreateWithCopiedBuffer(buffer.data(), buffer.size());
+ }
size_t GetSize() const { return size_; }
char* GetBuffer() { return buffer_; }
« no previous file with comments | « no previous file | chrome/browser/extensions/api/serial/serial_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698