| Index: chrome/common/child_process_logging_mac.mm
|
| ===================================================================
|
| --- chrome/common/child_process_logging_mac.mm (revision 144791)
|
| +++ chrome/common/child_process_logging_mac.mm (working copy)
|
| @@ -13,6 +13,7 @@
|
| #include "base/stringprintf.h"
|
| #include "base/sys_string_conversions.h"
|
| #include "base/utf_string_conversions.h"
|
| +#include "chrome/common/metrics/experiments_helper.h"
|
| #include "chrome/installer/util/google_update_settings.h"
|
| #include "content/public/common/gpu_info.h"
|
| #include "googleurl/src/gurl.h"
|
| @@ -220,8 +221,31 @@
|
| }
|
| }
|
|
|
| -void SetExperimentList(const std::vector<string16>& state) {
|
| - // TODO(mad): Implement this.
|
| +void SetExperimentList(const std::vector<string16>& experiments) {
|
| + // These should match the corresponding strings in breakpad_win.cc.
|
| + NSString* const kNumExperimentsKey = @"num-experiments";
|
| + NSString* const kExperimentChunkFormat = @"experiment-chunk-%zu"; // 1-based.
|
| +
|
| + std::vector<string16> chunks;
|
| + experiments_helper::GenerateExperimentChunks(experiments, &chunks);
|
| +
|
| + // Store up to |kMaxReportedExperimentChunks| chunks.
|
| + for (size_t i = 0; i < kMaxReportedExperimentChunks; ++i) {
|
| + NSString* key = [NSString stringWithFormat:kExperimentChunkFormat, i + 1];
|
| + if (i < chunks.size()) {
|
| + NSString* value = base::SysUTF16ToNSString(chunks[i]);
|
| + SetCrashKeyValue(key, value);
|
| + } else {
|
| + ClearCrashKey(key);
|
| + }
|
| + }
|
| +
|
| + // Make note of the total number of experiments, which may be greater than
|
| + // what was able to fit in |kMaxReportedExperimentChunks|. This is useful
|
| + // when correlating stability with the number of experiments running
|
| + // simultaneously.
|
| + SetCrashKeyValue(kNumExperimentsKey,
|
| + [NSString stringWithFormat:@"%zu", experiments.size()]);
|
| }
|
|
|
| void SetChannel(const std::string& channel) {
|
|
|