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

Unified Diff: base/values.cc

Issue 4924001: JavaScript to Value bridge. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Go back to using seconds, use UTC for reliability in the test. Created 10 years, 1 month 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
Index: base/values.cc
diff --git a/base/values.cc b/base/values.cc
index cd0f6a81eef3737fde57fbbb9a022494fe80c94a..f1822f4045050c504fc32fbcd9aac85248f6db94 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -119,6 +119,10 @@ bool Value::GetAsString(string16* out_value) const {
return false;
}
+bool Value::GetAsList(ListValue** out_value) {
+ return false;
+}
+
Value* Value::DeepCopy() const {
// This method should only be getting called for null Values--all subclasses
// need to provide their own implementation;.
@@ -954,6 +958,12 @@ bool ListValue::Insert(size_t index, Value* in_value) {
return true;
}
+bool ListValue::GetAsList(ListValue** out_value) {
+ if (out_value)
+ *out_value = this;
+ return true;
+}
+
Value* ListValue::DeepCopy() const {
ListValue* result = new ListValue;

Powered by Google App Engine
This is Rietveld 408576698