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

Unified Diff: chrome/common/metrics/experiments_helper.cc

Issue 9432033: Add experiments info to crash dumps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Last Few Nits Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/metrics/experiments_helper.h ('k') | chrome/renderer/chrome_render_process_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/metrics/experiments_helper.cc
===================================================================
--- chrome/common/metrics/experiments_helper.cc (revision 0)
+++ chrome/common/metrics/experiments_helper.cc (revision 0)
@@ -0,0 +1,29 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/metrics/experiments_helper.h"
+
+#include <vector>
+
+#include "base/metrics/field_trial.h"
+#include "base/string16.h"
+#include "base/stringprintf.h"
+#include "base/utf_string_conversions.h"
+#include "chrome/common/child_process_logging.h"
+
+namespace ExperimentsHelper {
+
+void SetChildProcessLoggingExperimentList() {
+ std::vector<base::FieldTrial::NameGroupId> name_group_ids;
+ base::FieldTrialList::GetFieldTrialNameGroupIds(&name_group_ids);
+ std::vector<string16> experiment_strings(name_group_ids.size());
+ for (size_t i = 0; i < name_group_ids.size(); ++i) {
+ // Wish there was a StringPrintf for string16... :-(
+ experiment_strings[i] = WideToUTF16(base::StringPrintf(
+ L"%x-%x", name_group_ids[i].name, name_group_ids[i].group));
+ }
+ child_process_logging::SetExperimentList(experiment_strings);
+}
+
+} // namespace ExperimentsHelper
Property changes on: chrome\common\metrics\experiments_helper.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/common/metrics/experiments_helper.h ('k') | chrome/renderer/chrome_render_process_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698