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

Side by Side Diff: tools/json_schema_compiler/util.cc

Issue 9423035: Fix json_schema_compiler utils (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/json_schema_compiler/util.h" 5 #include "tools/json_schema_compiler/util.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 8
9 namespace json_schema_compiler { 9 namespace json_schema_compiler {
10 namespace util { 10 namespace util {
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 void AddItemToList(const bool from, base::ListValue* out) { 41 void AddItemToList(const bool from, base::ListValue* out) {
42 out->Append(base::Value::CreateBooleanValue(from)); 42 out->Append(base::Value::CreateBooleanValue(from));
43 } 43 }
44 void AddItemToList(const double from, base::ListValue* out) { 44 void AddItemToList(const double from, base::ListValue* out) {
45 out->Append(base::Value::CreateDoubleValue(from)); 45 out->Append(base::Value::CreateDoubleValue(from));
46 } 46 }
47 void AddItemToList(const std::string& from, base::ListValue* out) { 47 void AddItemToList(const std::string& from, base::ListValue* out) {
48 out->Append(base::Value::CreateStringValue(from)); 48 out->Append(base::Value::CreateStringValue(from));
49 } 49 }
50 void AddItemToList(const linked_ptr<base::DictionaryValue> from, 50 void AddItemToList(const linked_ptr<base::DictionaryValue>& from,
51 base::ListValue* out) { 51 base::ListValue* out) {
52 out->Append(static_cast<Value*>(from->DeepCopy())); 52 out->Append(static_cast<Value*>(from->DeepCopy()));
53 } 53 }
54 54
55 } // namespace api_util 55 } // namespace api_util
56 } // namespace extensions 56 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698