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

Unified Diff: base/json/json_parser.cc

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 | « no previous file | base/values.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/json_parser.cc
diff --git a/base/json/json_parser.cc b/base/json/json_parser.cc
index 1850a1a3f66e2dc4814235c75d3b8190bef794f9..ab5c061f8ead844bbf7ecfc7fb2df637e33ce8c7 100644
--- a/base/json/json_parser.cc
+++ b/base/json/json_parser.cc
@@ -151,6 +151,10 @@ class JSONStringValue : public Value {
*out_value = UTF8ToUTF16(string_piece_);
return true;
}
+ bool GetAsString(StringPiece* out_value) const override {
+ *out_value = string_piece_;
+ return true;
+ }
Value* DeepCopy() const override { return new StringValue(string_piece_); }
bool Equals(const Value* other) const override {
std::string other_string;
« no previous file with comments | « no previous file | base/values.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698