| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/breakpad/app/breakpad_win.h" | 5 #include "components/breakpad/app/breakpad_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 #include <tchar.h> | 9 #include <tchar.h> |
| 10 #include <userenv.h> | 10 #include <userenv.h> |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 #ifndef _WIN64 | 588 #ifndef _WIN64 |
| 589 if (process_type != L"browser" && | 589 if (process_type != L"browser" && |
| 590 !GetBreakpadClient()->IsRunningUnattended()) { | 590 !GetBreakpadClient()->IsRunningUnattended()) { |
| 591 // Initialize the hook TerminateProcess to catch unexpected exits. | 591 // Initialize the hook TerminateProcess to catch unexpected exits. |
| 592 InitTerminateProcessHooks(); | 592 InitTerminateProcessHooks(); |
| 593 } | 593 } |
| 594 #endif | 594 #endif |
| 595 } | 595 } |
| 596 } | 596 } |
| 597 | 597 |
| 598 // If the user has disabled crash reporting uploads and restarted Chrome, the |
| 599 // restarted instance will still contain the pipe environment variable, which |
| 600 // will allow the restarted process to still upload crash reports. This function |
| 601 // clears the environment variable, so that the restarted Chrome, which inherits |
| 602 // its environment from the current Chrome, will no longer contain the variable. |
| 603 extern "C" void __declspec(dllexport) __cdecl |
| 604 ClearBreakpadPipeEnvironmentVariable() { |
| 605 scoped_ptr<base::Environment> env(base::Environment::Create()); |
| 606 env->UnSetVar(kPipeNameVar); |
| 607 } |
| 608 |
| 598 } // namespace breakpad | 609 } // namespace breakpad |
| OLD | NEW |