1 // Copyright 2017 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "values.h" 6 7 // All of these should be renamed to |GetList().emplace_back()|. F()8void F() { 9 base::ListValue value; 10 value.AppendBoolean(false); 11 value.AppendInteger(0); 12 value.AppendDouble(0.0); 13 value.AppendString(""); 14 } 15 16 // All of these should be renamed to GetList() + their std::vector equivalent. G()17void G() { 18 base::ListValue value; 19 value.Clear(); 20 value.GetSize(); 21 value.empty(); 22 value.Reserve(0); 23 } 24 25 // None of these should be renamed, as these methods require different handling. H()26void H() { 27 base::ListValue value; 28 value.Append(std::unique_ptr<base::Value>(new base::Value())); 29 value.AppendStrings({"foo", "bar"}); 30 value.AppendIfNotPresent(std::unique_ptr<base::Value>(new base::Value())); 31 } 32