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

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: Last Few Nits 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
« no previous file with comments | « chrome/common/child_process_logging_posix.cc ('k') | chrome/common/metrics/experiments_helper.h » ('j') | 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 130670)
+++ chrome/common/child_process_logging_win.cc (working copy)
@@ -48,6 +48,10 @@
// void __declspec(dllexport) __cdecl SetCommandLine
typedef void (__cdecl *MainSetCommandLine)(const CommandLine*);
+// exported in breakpad_field_trial_win.cc:
+// void __declspec(dllexport) __cdecl SetExperimentList
+typedef void (__cdecl *MainSetExperimentList)(const std::vector<string16>&);
+
void SetActiveURL(const GURL& url) {
static MainSetActiveURL set_active_url = NULL;
// note: benign race condition on set_active_url.
@@ -79,6 +83,7 @@
GoogleUpdateSettings::SetMetricsId(wstr);
static MainSetClientId set_client_id = NULL;
+ // note: benign race condition on set_client_id.
if (!set_client_id) {
HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
if (!exe_module)
@@ -101,6 +106,7 @@
void SetActiveExtensions(const std::set<std::string>& extension_ids) {
static MainSetNumberOfExtensions set_number_of_extensions = NULL;
+ // note: benign race condition on set_number_of_extensions.
if (!set_number_of_extensions) {
HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
if (!exe_module)
@@ -112,6 +118,7 @@
}
static MainSetExtensionID set_extension_id = NULL;
+ // note: benign race condition on set_extension_id.
if (!set_extension_id) {
HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
if (!exe_module)
@@ -137,6 +144,7 @@
void SetGpuInfo(const content::GPUInfo& gpu_info) {
static MainSetGpuInfo set_gpu_info = NULL;
+ // note: benign race condition on set_gpu_info.
if (!set_gpu_info) {
HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
if (!exe_module)
@@ -156,6 +164,7 @@
void SetPrinterInfo(const char* printer_info) {
static MainSetPrinterInfo set_printer_info = NULL;
+ // note: benign race condition on set_printer_info.
if (!set_printer_info) {
HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
if (!exe_module)
@@ -170,6 +179,7 @@
void SetCommandLine(const CommandLine* command_line) {
static MainSetCommandLine set_command_line = NULL;
+ // note: benign race condition on set_command_line.
if (!set_command_line) {
HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
if (!exe_module)
@@ -182,8 +192,24 @@
(set_command_line)(command_line);
}
+void SetExperimentList(const std::vector<string16>& state) {
+ static MainSetExperimentList set_experiment_list = NULL;
+ // note: benign race condition on set_experiment_list.
+ if (!set_experiment_list) {
+ HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
+ if (!exe_module)
+ return;
+ set_experiment_list = reinterpret_cast<MainSetExperimentList>(
+ GetProcAddress(exe_module, "SetExperimentList"));
+ if (!set_experiment_list)
+ return;
+ }
+ (set_experiment_list)(state);
+}
+
void SetNumberOfViews(int number_of_views) {
static MainSetNumberOfViews set_number_of_views = NULL;
+ // note: benign race condition on set_number_of_views.
if (!set_number_of_views) {
HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
if (!exe_module)
« no previous file with comments | « chrome/common/child_process_logging_posix.cc ('k') | chrome/common/metrics/experiments_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698