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

Side by Side Diff: components/version_ui/version_handler_helper.cc

Issue 2030833003: Remove ListValue::Append(new {Fundamental,String}Value(...)) pattern in //components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « components/url_matcher/url_matcher_factory_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/version_ui/version_handler_helper.h" 5 #include "components/version_ui/version_handler_helper.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 18 matching lines...) Expand all
29 variations.push_back(line); 29 variations.push_back(line);
30 } 30 }
31 #else 31 #else
32 // In release mode, display the hashes only. 32 // In release mode, display the hashes only.
33 variations::GetFieldTrialActiveGroupIdsAsStrings(&variations); 33 variations::GetFieldTrialActiveGroupIdsAsStrings(&variations);
34 #endif 34 #endif
35 35
36 std::unique_ptr<base::ListValue> variations_list(new base::ListValue); 36 std::unique_ptr<base::ListValue> variations_list(new base::ListValue);
37 for (std::vector<std::string>::const_iterator it = variations.begin(); 37 for (std::vector<std::string>::const_iterator it = variations.begin();
38 it != variations.end(); ++it) { 38 it != variations.end(); ++it) {
39 variations_list->Append(new base::StringValue(*it)); 39 variations_list->AppendString(*it);
40 } 40 }
41 41
42 return std::move(variations_list); 42 return std::move(variations_list);
43 } 43 }
44 44
45 } // namespace version_ui 45 } // namespace version_ui
OLDNEW
« no previous file with comments | « components/url_matcher/url_matcher_factory_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698