Index: components/breakpad/app/breakpad_win.cc |
diff --git a/components/breakpad/app/breakpad_win.cc b/components/breakpad/app/breakpad_win.cc |
index 56c4cf9b1086cb3843be822624c83b189d7b6fed..5fdf9c29697741695fe2f5560a0d6ecdd42cd337 100644 |
--- a/components/breakpad/app/breakpad_win.cc |
+++ b/components/breakpad/app/breakpad_win.cc |
@@ -595,4 +595,15 @@ void InitCrashReporter(const std::string& process_type_switch) { |
} |
} |
+// If the user has disabled crash reporting uploads and restarted Chrome, the |
+// restarted instance will still contain the pipe environment variable, which |
+// will allow the restarted process to still upload crash reports. This function |
+// clears the environment variable, so that the restarted Chrome, which inherits |
+// its environment from the current Chrome, will no longer contain the variable. |
+extern "C" void __declspec(dllexport) __cdecl |
+ ClearBreakpadPipeEnvironmentVariable() { |
+ scoped_ptr<base::Environment> env(base::Environment::Create()); |
+ env->UnSetVar(kPipeNameVar); |
+} |
+ |
} // namespace breakpad |