OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "extensions/common/value_builder.h" | 5 #include "extensions/common/value_builder.h" |
6 | 6 |
7 namespace extensions { | 7 namespace extensions { |
8 | 8 |
9 // DictionaryBuilder | 9 // DictionaryBuilder |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 return *this; | 27 return *this; |
28 } | 28 } |
29 | 29 |
30 DictionaryBuilder& DictionaryBuilder::Set(const std::string& path, | 30 DictionaryBuilder& DictionaryBuilder::Set(const std::string& path, |
31 const std::string& in_value) { | 31 const std::string& in_value) { |
32 dict_->SetWithoutPathExpansion(path, new base::StringValue(in_value)); | 32 dict_->SetWithoutPathExpansion(path, new base::StringValue(in_value)); |
33 return *this; | 33 return *this; |
34 } | 34 } |
35 | 35 |
36 DictionaryBuilder& DictionaryBuilder::Set(const std::string& path, | 36 DictionaryBuilder& DictionaryBuilder::Set(const std::string& path, |
37 const string16& in_value) { | 37 const base::string16& in_value) { |
38 dict_->SetWithoutPathExpansion(path, new base::StringValue(in_value)); | 38 dict_->SetWithoutPathExpansion(path, new base::StringValue(in_value)); |
39 return *this; | 39 return *this; |
40 } | 40 } |
41 | 41 |
42 DictionaryBuilder& DictionaryBuilder::Set(const std::string& path, | 42 DictionaryBuilder& DictionaryBuilder::Set(const std::string& path, |
43 DictionaryBuilder& in_value) { | 43 DictionaryBuilder& in_value) { |
44 dict_->SetWithoutPathExpansion(path, in_value.Build().release()); | 44 dict_->SetWithoutPathExpansion(path, in_value.Build().release()); |
45 return *this; | 45 return *this; |
46 } | 46 } |
47 | 47 |
(...skipping 24 matching lines...) Expand all Loading... |
72 ListBuilder& ListBuilder::Append(double in_value) { | 72 ListBuilder& ListBuilder::Append(double in_value) { |
73 list_->Append(new base::FundamentalValue(in_value)); | 73 list_->Append(new base::FundamentalValue(in_value)); |
74 return *this; | 74 return *this; |
75 } | 75 } |
76 | 76 |
77 ListBuilder& ListBuilder::Append(const std::string& in_value) { | 77 ListBuilder& ListBuilder::Append(const std::string& in_value) { |
78 list_->Append(new base::StringValue(in_value)); | 78 list_->Append(new base::StringValue(in_value)); |
79 return *this; | 79 return *this; |
80 } | 80 } |
81 | 81 |
82 ListBuilder& ListBuilder::Append(const string16& in_value) { | 82 ListBuilder& ListBuilder::Append(const base::string16& in_value) { |
83 list_->Append(new base::StringValue(in_value)); | 83 list_->Append(new base::StringValue(in_value)); |
84 return *this; | 84 return *this; |
85 } | 85 } |
86 | 86 |
87 ListBuilder& ListBuilder::Append(DictionaryBuilder& in_value) { | 87 ListBuilder& ListBuilder::Append(DictionaryBuilder& in_value) { |
88 list_->Append(in_value.Build().release()); | 88 list_->Append(in_value.Build().release()); |
89 return *this; | 89 return *this; |
90 } | 90 } |
91 | 91 |
92 ListBuilder& ListBuilder::Append(ListBuilder& in_value) { | 92 ListBuilder& ListBuilder::Append(ListBuilder& in_value) { |
93 list_->Append(in_value.Build().release()); | 93 list_->Append(in_value.Build().release()); |
94 return *this; | 94 return *this; |
95 } | 95 } |
96 | 96 |
97 ListBuilder& ListBuilder::AppendBoolean(bool in_value) { | 97 ListBuilder& ListBuilder::AppendBoolean(bool in_value) { |
98 list_->Append(new base::FundamentalValue(in_value)); | 98 list_->Append(new base::FundamentalValue(in_value)); |
99 return *this; | 99 return *this; |
100 } | 100 } |
101 | 101 |
102 } // namespace extensions | 102 } // namespace extensions |
OLD | NEW |