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

Unified Diff: tools/json_schema_compiler/any.cc

Issue 9491002: json_schema_compiler: any, additionalProperties, functions on types (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: remove whitespace Created 8 years, 10 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
Index: tools/json_schema_compiler/any.cc
diff --git a/tools/json_schema_compiler/any.cc b/tools/json_schema_compiler/any.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e648ba3bcfb54d386e6eba9ce18caca4edba9deb
--- /dev/null
+++ b/tools/json_schema_compiler/any.cc
@@ -0,0 +1,27 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "tools/json_schema_compiler/any.h"
+
+#include "base/logging.h"
+#include "base/values.h"
+
+namespace json_schema_compiler {
+namespace any {
+
+Any::Any() {}
+
+Any::~Any() {}
+
+void Any::CopyFrom(const base::Value& from_value) {
+ value_.reset(from_value.DeepCopy());
not at google - send to devlin 2012/02/28 22:41:17 Is it true that this should be called exactly once
calamity 2012/03/01 04:47:09 Done.
+}
+
+const base::Value& Any::value() const {
+ CHECK(value_.get());
+ return *value_;
+}
+
+} // namespace any
+} // namespace json_schema_compiler

Powered by Google App Engine
This is Rietveld 408576698