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

Side by Side Diff: base/values.cc

Issue 2809933003: Remove ListValue::Append(raw ptr) on Win (Closed)
Patch Set: Includes 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') | chrome/browser/win/enumerate_modules_model.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) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
1238 void ListValue::Append(Value* in_value) {
1239 DCHECK(in_value);
1240 Append(WrapUnique(in_value));
1241 }
1242 #endif
1243
1244 void ListValue::AppendBoolean(bool in_value) { 1237 void ListValue::AppendBoolean(bool in_value) {
1245 Append(MakeUnique<Value>(in_value)); 1238 Append(MakeUnique<Value>(in_value));
1246 } 1239 }
1247 1240
1248 void ListValue::AppendInteger(int in_value) { 1241 void ListValue::AppendInteger(int in_value) {
1249 Append(MakeUnique<Value>(in_value)); 1242 Append(MakeUnique<Value>(in_value));
1250 } 1243 }
1251 1244
1252 void ListValue::AppendDouble(double in_value) { 1245 void ListValue::AppendDouble(double in_value) {
1253 Append(MakeUnique<Value>(in_value)); 1246 Append(MakeUnique<Value>(in_value));
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 } 1316 }
1324 1317
1325 std::ostream& operator<<(std::ostream& out, const Value::Type& type) { 1318 std::ostream& operator<<(std::ostream& out, const Value::Type& type) {
1326 if (static_cast<int>(type) < 0 || 1319 if (static_cast<int>(type) < 0 ||
1327 static_cast<size_t>(type) >= arraysize(kTypeNames)) 1320 static_cast<size_t>(type) >= arraysize(kTypeNames))
1328 return out << "Invalid Type (index = " << static_cast<int>(type) << ")"; 1321 return out << "Invalid Type (index = " << static_cast<int>(type) << ")";
1329 return out << Value::GetTypeName(type); 1322 return out << Value::GetTypeName(type);
1330 } 1323 }
1331 1324
1332 } // namespace base 1325 } // namespace base
OLDNEW
« no previous file with comments | « base/values.h ('k') | chrome/browser/win/enumerate_modules_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698