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

Unified Diff: chrome/common/child_process_logging_win.cc

Issue 9432033: Add experiments info to crash dumps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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
« chrome/chrome_tests.gypi ('K') | « chrome/common/child_process_logging_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/child_process_logging_win.cc
===================================================================
--- chrome/common/child_process_logging_win.cc (revision 125856)
+++ chrome/common/child_process_logging_win.cc (working copy)
@@ -44,6 +44,15 @@
// void __declspec(dllexport) __cdecl SetCommandLine
typedef void (__cdecl *MainSetCommandLine)(const CommandLine*);
+// exported in breakpad_win.cc:
+// void __declspec(dllexport) __cdecl InitExperimentList
+typedef void (__cdecl *MainInitExperimentList)();
+
+// exported in breakpad_win.cc:
+// void __declspec(dllexport) __cdecl AddFieldTrialGroup
+typedef void (__cdecl *MainAddFieldTrialGroup)(const std::string&,
+ const std::string&);
+
void SetActiveURL(const GURL& url) {
static MainSetActiveURL set_active_url = NULL;
// note: benign race condition on set_active_url.
@@ -164,6 +173,35 @@
(set_command_line)(command_line);
}
+void InitExperimentList() {
+ static MainInitExperimentList init_experiment_list = NULL;
+ if (!init_experiment_list) {
+ HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
+ if (!exe_module)
+ return;
+ init_experiment_list = reinterpret_cast<MainInitExperimentList>(
+ GetProcAddress(exe_module, "InitExperimentList"));
+ if (!init_experiment_list)
+ return;
+ }
+ (init_experiment_list)();
+}
+
+void AddFieldTrialGroup(const std::string& field_trial_name,
+ const std::string& group_name) {
+ static MainAddFieldTrialGroup add_field_trial_group = NULL;
+ if (!add_field_trial_group) {
+ HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
+ if (!exe_module)
+ return;
+ add_field_trial_group = reinterpret_cast<MainAddFieldTrialGroup>(
+ GetProcAddress(exe_module, "AddFieldTrialGroup"));
+ if (!add_field_trial_group)
+ return;
+ }
+ (add_field_trial_group)(field_trial_name, group_name);
+}
+
void SetNumberOfViews(int number_of_views) {
static MainSetNumberOfViews set_number_of_views = NULL;
if (!set_number_of_views) {
« chrome/chrome_tests.gypi ('K') | « chrome/common/child_process_logging_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698