I have reviewed a CL today and was surprised to see ListValues passed by by value. I am concerned that this introduces patterns where people copy (!) large parts of the lists and dictionaries out of the pref service.
What do you think of the following proposal to make copying an explicit activity?
disallow
explicit ListValue(const ListStorage&);
ListStorage& operator=(const ListStorage&);
but provide
explicit ListValue(ListStorage&&);
ListStorage& operator=(ListStorage&&);
ListStorage DeepClone();
Comment 1 by jdoerrie@chromium.org
, Jul 13 2017