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

Side by Side Diff: base/values.cc

Issue 7714024: Remove check_on_delete for ChromeOS to avoid change to sizeof(Value) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « base/values.h ('k') | 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) 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/float_util.h" 7 #include "base/float_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 } 59 }
60 60
61 } // namespace 61 } // namespace
62 62
63 namespace base { 63 namespace base {
64 64
65 ///////////////////// Value //////////////////// 65 ///////////////////// Value ////////////////////
66 66
67 Value::~Value() { 67 Value::~Value() {
68 #if !defined(OS_CHROMEOS)
68 CHECK(!check_on_delete_); 69 CHECK(!check_on_delete_);
70 #endif
69 } 71 }
70 72
71 // static 73 // static
72 Value* Value::CreateNullValue() { 74 Value* Value::CreateNullValue() {
73 return new Value(TYPE_NULL); 75 return new Value(TYPE_NULL);
74 } 76 }
75 77
76 // static 78 // static
77 FundamentalValue* Value::CreateBooleanValue(bool in_value) { 79 FundamentalValue* Value::CreateBooleanValue(bool in_value) {
78 return new FundamentalValue(in_value); 80 return new FundamentalValue(in_value);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 return other->IsType(TYPE_NULL); 142 return other->IsType(TYPE_NULL);
141 } 143 }
142 144
143 // static 145 // static
144 bool Value::Equals(const Value* a, const Value* b) { 146 bool Value::Equals(const Value* a, const Value* b) {
145 if ((a == NULL) && (b == NULL)) return true; 147 if ((a == NULL) && (b == NULL)) return true;
146 if ((a == NULL) ^ (b == NULL)) return false; 148 if ((a == NULL) ^ (b == NULL)) return false;
147 return a->Equals(b); 149 return a->Equals(b);
148 } 150 }
149 151
150 Value::Value(Type type) : type_(type), check_on_delete_(false) { 152 Value::Value(Type type)
153 : type_(type)
154 #if !defined(OS_CHROMEOS)
155 , check_on_delete_(false)
156 #endif
157 {
151 } 158 }
152 159
153 ///////////////////// FundamentalValue //////////////////// 160 ///////////////////// FundamentalValue ////////////////////
154 161
155 FundamentalValue::FundamentalValue(bool in_value) 162 FundamentalValue::FundamentalValue(bool in_value)
156 : Value(TYPE_BOOLEAN), boolean_value_(in_value) { 163 : Value(TYPE_BOOLEAN), boolean_value_(in_value) {
157 } 164 }
158 165
159 FundamentalValue::FundamentalValue(int in_value) 166 FundamentalValue::FundamentalValue(int in_value)
160 : Value(TYPE_INTEGER), integer_value_(in_value) { 167 : Value(TYPE_INTEGER), integer_value_(in_value) {
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 if (lhs_it != end() || rhs_it != other_list->end()) 910 if (lhs_it != end() || rhs_it != other_list->end())
904 return false; 911 return false;
905 912
906 return true; 913 return true;
907 } 914 }
908 915
909 ValueSerializer::~ValueSerializer() { 916 ValueSerializer::~ValueSerializer() {
910 } 917 }
911 918
912 } // namespace base 919 } // namespace base
OLDNEW
« no previous file with comments | « base/values.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698