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..b429567446ff6b19cceff775ab786c066a50824f |
--- /dev/null |
+++ b/tools/json_schema_compiler/any.cc |
@@ -0,0 +1,28 @@ |
+// 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::Init(const base::Value& from_value) { |
+ CHECK(!value_.get()); |
+ value_.reset(from_value.DeepCopy()); |
+} |
+ |
+const base::Value& Any::value() const { |
+ CHECK(value_.get()); |
+ return *value_; |
+} |
+ |
+} // namespace any |
+} // namespace json_schema_compiler |