| OLD | NEW |
| 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 // This file specifies a recursive data storage class called Value intended for | 5 // This file specifies a recursive data storage class called Value intended for |
| 6 // storing settings and other persistable data. | 6 // storing settings and other persistable data. |
| 7 // | 7 // |
| 8 // A Value represents something that can be stored in JSON or passed to/from | 8 // A Value represents something that can be stored in JSON or passed to/from |
| 9 // JavaScript. As such, it is NOT a generalized variant type, since only the | 9 // JavaScript. As such, it is NOT a generalized variant type, since only the |
| 10 // types supported by JavaScript/JSON are supported. | 10 // types supported by JavaScript/JSON are supported. |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 Value* SetString(StringPiece path, StringPiece in_value); | 251 Value* SetString(StringPiece path, StringPiece in_value); |
| 252 Value* SetString(StringPiece path, const string16& in_value); | 252 Value* SetString(StringPiece path, const string16& in_value); |
| 253 DictionaryValue* SetDictionary(StringPiece path, | 253 DictionaryValue* SetDictionary(StringPiece path, |
| 254 std::unique_ptr<DictionaryValue> in_value); | 254 std::unique_ptr<DictionaryValue> in_value); |
| 255 ListValue* SetList(StringPiece path, std::unique_ptr<ListValue> in_value); | 255 ListValue* SetList(StringPiece path, std::unique_ptr<ListValue> in_value); |
| 256 | 256 |
| 257 // Like Set(), but without special treatment of '.'. This allows e.g. URLs to | 257 // Like Set(), but without special treatment of '.'. This allows e.g. URLs to |
| 258 // be used as paths. | 258 // be used as paths. |
| 259 Value* SetWithoutPathExpansion(StringPiece key, | 259 Value* SetWithoutPathExpansion(StringPiece key, |
| 260 std::unique_ptr<Value> in_value); | 260 std::unique_ptr<Value> in_value); |
| 261 // Deprecated version of the above. TODO(estade): remove. | |
| 262 Value* SetWithoutPathExpansion(StringPiece key, Value* in_value); | |
| 263 | 261 |
| 264 // Convenience forms of SetWithoutPathExpansion(). | 262 // Convenience forms of SetWithoutPathExpansion(). |
| 265 Value* SetBooleanWithoutPathExpansion(StringPiece path, bool in_value); | 263 Value* SetBooleanWithoutPathExpansion(StringPiece path, bool in_value); |
| 266 Value* SetIntegerWithoutPathExpansion(StringPiece path, int in_value); | 264 Value* SetIntegerWithoutPathExpansion(StringPiece path, int in_value); |
| 267 Value* SetDoubleWithoutPathExpansion(StringPiece path, double in_value); | 265 Value* SetDoubleWithoutPathExpansion(StringPiece path, double in_value); |
| 268 Value* SetStringWithoutPathExpansion(StringPiece path, StringPiece in_value); | 266 Value* SetStringWithoutPathExpansion(StringPiece path, StringPiece in_value); |
| 269 Value* SetStringWithoutPathExpansion(StringPiece path, | 267 Value* SetStringWithoutPathExpansion(StringPiece path, |
| 270 const string16& in_value); | 268 const string16& in_value); |
| 271 DictionaryValue* SetDictionaryWithoutPathExpansion( | 269 DictionaryValue* SetDictionaryWithoutPathExpansion( |
| 272 StringPiece path, | 270 StringPiece path, |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 return out << static_cast<const Value&>(value); | 543 return out << static_cast<const Value&>(value); |
| 546 } | 544 } |
| 547 | 545 |
| 548 // Stream operator so that enum class Types can be used in log statements. | 546 // Stream operator so that enum class Types can be used in log statements. |
| 549 BASE_EXPORT std::ostream& operator<<(std::ostream& out, | 547 BASE_EXPORT std::ostream& operator<<(std::ostream& out, |
| 550 const Value::Type& type); | 548 const Value::Type& type); |
| 551 | 549 |
| 552 } // namespace base | 550 } // namespace base |
| 553 | 551 |
| 554 #endif // BASE_VALUES_H_ | 552 #endif // BASE_VALUES_H_ |
| OLD | NEW |