| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/values.h" | 5 #include "base/values.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 | 10 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 return other->IsType(TYPE_NULL); | 138 return other->IsType(TYPE_NULL); |
| 139 } | 139 } |
| 140 | 140 |
| 141 // static | 141 // static |
| 142 bool Value::Equals(const Value* a, const Value* b) { | 142 bool Value::Equals(const Value* a, const Value* b) { |
| 143 if ((a == NULL) && (b == NULL)) return true; | 143 if ((a == NULL) && (b == NULL)) return true; |
| 144 if ((a == NULL) ^ (b == NULL)) return false; | 144 if ((a == NULL) ^ (b == NULL)) return false; |
| 145 return a->Equals(b); | 145 return a->Equals(b); |
| 146 } | 146 } |
| 147 | 147 |
| 148 Value::Value(ValueType type) : type_(type) { | 148 Value::Value(Type type) : type_(type) { |
| 149 } | 149 } |
| 150 | 150 |
| 151 ///////////////////// FundamentalValue //////////////////// | 151 ///////////////////// FundamentalValue //////////////////// |
| 152 | 152 |
| 153 FundamentalValue::FundamentalValue(bool in_value) | 153 FundamentalValue::FundamentalValue(bool in_value) |
| 154 : Value(TYPE_BOOLEAN), boolean_value_(in_value) { | 154 : Value(TYPE_BOOLEAN), boolean_value_(in_value) { |
| 155 } | 155 } |
| 156 | 156 |
| 157 FundamentalValue::FundamentalValue(int in_value) | 157 FundamentalValue::FundamentalValue(int in_value) |
| 158 : Value(TYPE_INTEGER), integer_value_(in_value) { | 158 : Value(TYPE_INTEGER), integer_value_(in_value) { |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 if (lhs_it != end() || rhs_it != other_list->end()) | 898 if (lhs_it != end() || rhs_it != other_list->end()) |
| 899 return false; | 899 return false; |
| 900 | 900 |
| 901 return true; | 901 return true; |
| 902 } | 902 } |
| 903 | 903 |
| 904 ValueSerializer::~ValueSerializer() { | 904 ValueSerializer::~ValueSerializer() { |
| 905 } | 905 } |
| 906 | 906 |
| 907 } // namespace base | 907 } // namespace base |
| OLD | NEW |