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

Side by Side Diff: base/values.cc

Issue 2817603003: Remove ListValue::Append(raw ptr) on Mac and iOS (Closed)
Patch Set: Comments Created 3 years, 8 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 | « base/values.h ('k') | components/policy/core/common/mac_util.cc » ('j') | 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 "base/values.h" 5 #include "base/values.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 if (out_value) 1227 if (out_value)
1228 *out_value = MakeUnique<Value>(std::move(*iter)); 1228 *out_value = MakeUnique<Value>(std::move(*iter));
1229 1229
1230 return list_->erase(iter); 1230 return list_->erase(iter);
1231 } 1231 }
1232 1232
1233 void ListValue::Append(std::unique_ptr<Value> in_value) { 1233 void ListValue::Append(std::unique_ptr<Value> in_value) {
1234 list_->push_back(std::move(*in_value)); 1234 list_->push_back(std::move(*in_value));
1235 } 1235 }
1236 1236
1237 #if !defined(OS_LINUX) 1237 #if !defined(OS_LINUX) && !defined(OS_MACOSX)
1238 void ListValue::Append(Value* in_value) { 1238 void ListValue::Append(Value* in_value) {
1239 DCHECK(in_value); 1239 DCHECK(in_value);
1240 Append(WrapUnique(in_value)); 1240 Append(WrapUnique(in_value));
1241 } 1241 }
1242 #endif 1242 #endif
1243 1243
1244 void ListValue::AppendBoolean(bool in_value) { 1244 void ListValue::AppendBoolean(bool in_value) {
1245 Append(MakeUnique<Value>(in_value)); 1245 Append(MakeUnique<Value>(in_value));
1246 } 1246 }
1247 1247
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 } 1323 }
1324 1324
1325 std::ostream& operator<<(std::ostream& out, const Value::Type& type) { 1325 std::ostream& operator<<(std::ostream& out, const Value::Type& type) {
1326 if (static_cast<int>(type) < 0 || 1326 if (static_cast<int>(type) < 0 ||
1327 static_cast<size_t>(type) >= arraysize(kTypeNames)) 1327 static_cast<size_t>(type) >= arraysize(kTypeNames))
1328 return out << "Invalid Type (index = " << static_cast<int>(type) << ")"; 1328 return out << "Invalid Type (index = " << static_cast<int>(type) << ")";
1329 return out << Value::GetTypeName(type); 1329 return out << Value::GetTypeName(type);
1330 } 1330 }
1331 1331
1332 } // namespace base 1332 } // namespace base
OLDNEW
« no previous file with comments | « base/values.h ('k') | components/policy/core/common/mac_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698