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

Side by Side Diff: base/values.cc

Issue 2848493006: Remove ListValue::Append(raw ptr) on Android (Closed)
Patch Set: Created 3 years, 7 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/android/bookmarks/partner_bookmarks_shim.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 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 if (out_value) 1242 if (out_value)
1243 *out_value = MakeUnique<Value>(std::move(*iter)); 1243 *out_value = MakeUnique<Value>(std::move(*iter));
1244 1244
1245 return list_->erase(iter); 1245 return list_->erase(iter);
1246 } 1246 }
1247 1247
1248 void ListValue::Append(std::unique_ptr<Value> in_value) { 1248 void ListValue::Append(std::unique_ptr<Value> in_value) {
1249 list_->push_back(std::move(*in_value)); 1249 list_->push_back(std::move(*in_value));
1250 } 1250 }
1251 1251
1252 #if !defined(OS_LINUX) && !defined(OS_MACOSX) 1252 #if !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
1253 void ListValue::Append(Value* in_value) { 1253 void ListValue::Append(Value* in_value) {
1254 DCHECK(in_value); 1254 DCHECK(in_value);
1255 Append(WrapUnique(in_value)); 1255 Append(WrapUnique(in_value));
1256 } 1256 }
1257 #endif 1257 #endif
1258 1258
1259 void ListValue::AppendBoolean(bool in_value) { 1259 void ListValue::AppendBoolean(bool in_value) {
1260 Append(MakeUnique<Value>(in_value)); 1260 Append(MakeUnique<Value>(in_value));
1261 } 1261 }
1262 1262
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 } 1338 }
1339 1339
1340 std::ostream& operator<<(std::ostream& out, const Value::Type& type) { 1340 std::ostream& operator<<(std::ostream& out, const Value::Type& type) {
1341 if (static_cast<int>(type) < 0 || 1341 if (static_cast<int>(type) < 0 ||
1342 static_cast<size_t>(type) >= arraysize(kTypeNames)) 1342 static_cast<size_t>(type) >= arraysize(kTypeNames))
1343 return out << "Invalid Type (index = " << static_cast<int>(type) << ")"; 1343 return out << "Invalid Type (index = " << static_cast<int>(type) << ")";
1344 return out << Value::GetTypeName(type); 1344 return out << Value::GetTypeName(type);
1345 } 1345 }
1346 1346
1347 } // namespace base 1347 } // namespace base
OLDNEW
« no previous file with comments | « base/values.h ('k') | chrome/browser/android/bookmarks/partner_bookmarks_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698