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

Unified Diff: base/values.h

Issue 2577563002: Add struct traits for base::Value. (Closed)
Patch Set: rebase Created 4 years 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 | « base/json/json_parser.cc ('k') | base/values.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 14a02e4077ea3ea7cad83a9ee1275360c033fbc1..8becd3046ac0616bbb691b21ebabeed079850ef9 100644
--- a/base/values.h
+++ b/base/values.h
@@ -88,6 +88,7 @@ class BASE_EXPORT Value {
virtual bool GetAsString(std::string* out_value) const;
virtual bool GetAsString(string16* out_value) const;
virtual bool GetAsString(const StringValue** out_value) const;
+ virtual bool GetAsString(StringPiece* out_value) const;
virtual bool GetAsBinary(const BinaryValue** out_value) const;
// ListValue::From is the equivalent for std::unique_ptr conversions.
virtual bool GetAsList(ListValue** out_value);
@@ -166,6 +167,7 @@ class BASE_EXPORT StringValue : public Value {
bool GetAsString(std::string* out_value) const override;
bool GetAsString(string16* out_value) const override;
bool GetAsString(const StringValue** out_value) const override;
+ bool GetAsString(StringPiece* out_value) const override;
StringValue* DeepCopy() const override;
bool Equals(const Value* other) const override;
« no previous file with comments | « base/json/json_parser.cc ('k') | base/values.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698