| OLD | NEW |
| 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 <vector> | 8 #include <vector> |
| 8 | 9 |
| 9 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| 10 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
| 11 #include "base/values.h" | 12 #include "base/values.h" |
| 12 #include "components/variations/active_field_trials.h" | 13 #include "components/variations/active_field_trials.h" |
| 13 | 14 |
| 14 namespace version_ui { | 15 namespace version_ui { |
| 15 | 16 |
| 16 scoped_ptr<base::Value> GetVariationsList() { | 17 scoped_ptr<base::Value> GetVariationsList() { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 31 // In release mode, display the hashes only. | 32 // In release mode, display the hashes only. |
| 32 variations::GetFieldTrialActiveGroupIdsAsStrings(&variations); | 33 variations::GetFieldTrialActiveGroupIdsAsStrings(&variations); |
| 33 #endif | 34 #endif |
| 34 | 35 |
| 35 scoped_ptr<base::ListValue> variations_list(new base::ListValue); | 36 scoped_ptr<base::ListValue> variations_list(new base::ListValue); |
| 36 for (std::vector<std::string>::const_iterator it = variations.begin(); | 37 for (std::vector<std::string>::const_iterator it = variations.begin(); |
| 37 it != variations.end(); ++it) { | 38 it != variations.end(); ++it) { |
| 38 variations_list->Append(new base::StringValue(*it)); | 39 variations_list->Append(new base::StringValue(*it)); |
| 39 } | 40 } |
| 40 | 41 |
| 41 return variations_list.Pass(); | 42 return std::move(variations_list); |
| 42 } | 43 } |
| 43 | 44 |
| 44 } // namespace version_ui | 45 } // namespace version_ui |
| OLD | NEW |