OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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 "chrome/common/metrics/experiments_helper.h" |
| 6 |
| 7 #include <vector> |
| 8 |
| 9 #include "base/metrics/field_trial.h" |
| 10 #include "base/string16.h" |
| 11 #include "base/stringprintf.h" |
| 12 #include "base/utf_string_conversions.h" |
| 13 #include "chrome/common/child_process_logging.h" |
| 14 |
| 15 namespace ExperimentsHelper { |
| 16 |
| 17 void SetChildProcessLoggingExperimentList() { |
| 18 std::vector<base::FieldTrial::NameGroupId> name_group_ids; |
| 19 base::FieldTrialList::GetFieldTrialNameGroupIds(&name_group_ids); |
| 20 std::vector<string16> experiment_strings(name_group_ids.size()); |
| 21 for (size_t i = 0; i < name_group_ids.size(); ++i) { |
| 22 // Wish there was a StringPrintf for string16... :-( |
| 23 experiment_strings[i] = WideToUTF16(base::StringPrintf( |
| 24 L"%x-%x", name_group_ids[i].name, name_group_ids[i].group)); |
| 25 } |
| 26 child_process_logging::SetExperimentList(experiment_strings); |
| 27 } |
| 28 |
| 29 } // namespace ExperimentsHelper |
OLD | NEW |