| Index: components/version_ui/version_handler_helper.cc
|
| diff --git a/components/version_ui/version_handler_helper.cc b/components/version_ui/version_handler_helper.cc
|
| index 2a9c2a1c1e13dad4c77079059a9124fde519a405..522238303ec655c4b4b7e985d3aea05140869c36 100644
|
| --- a/components/version_ui/version_handler_helper.cc
|
| +++ b/components/version_ui/version_handler_helper.cc
|
| @@ -13,8 +13,9 @@
|
|
|
| namespace version_ui {
|
|
|
| -scoped_ptr<base::Value> GetVariationsList() {
|
| - std::vector<std::string> variations;
|
| +scoped_ptr<std::vector<std::string>> GetVariations() {
|
| + scoped_ptr<std::vector<std::string>> variations(
|
| + new std::vector<std::string>);
|
| #if !defined(NDEBUG)
|
| base::FieldTrial::ActiveGroups active_groups;
|
| base::FieldTrialList::GetActiveFieldTrialGroups(&active_groups);
|
| @@ -25,20 +26,26 @@ scoped_ptr<base::Value> GetVariationsList() {
|
| for (const auto& group : active_groups) {
|
| std::string line = group.trial_name + ":" + group.group_name;
|
| base::ReplaceChars(line, "-", kNonBreakingHyphenUTF8String, &line);
|
| - variations.push_back(line);
|
| + variations->push_back(line);
|
| }
|
| #else
|
| // In release mode, display the hashes only.
|
| - variations::GetFieldTrialActiveGroupIdsAsStrings(&variations);
|
| + variations::GetFieldTrialActiveGroupIdsAsStrings(variations.get());
|
| #endif
|
| + return variations.Pass();
|
| +}
|
|
|
| +#if defined(OS_IOS)
|
| +scoped_ptr<base::Value> GetVariationsList() {
|
| + scoped_ptr<std::vector<std::string>> variations = GetVariations();
|
| scoped_ptr<base::ListValue> variations_list(new base::ListValue);
|
| - for (std::vector<std::string>::const_iterator it = variations.begin();
|
| - it != variations.end(); ++it) {
|
| + for (std::vector<std::string>::const_iterator it = variations->begin();
|
| + it != variations->end(); ++it) {
|
| variations_list->Append(new base::StringValue(*it));
|
| }
|
|
|
| return variations_list.Pass();
|
| }
|
| +#endif
|
|
|
| } // namespace version_ui
|
|
|