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/crash/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> |
11 #include <winnt.h> | 11 #include <winnt.h> |
12 | 12 |
13 #include <algorithm> | 13 #include <algorithm> |
14 #include <map> | 14 #include <map> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "base/base_switches.h" | 17 #include "base/base_switches.h" |
18 #include "base/basictypes.h" | 18 #include "base/basictypes.h" |
19 #include "base/command_line.h" | 19 #include "base/command_line.h" |
20 #include "base/debug/crash_logging.h" | 20 #include "base/debug/crash_logging.h" |
21 #include "base/debug/dump_without_crashing.h" | 21 #include "base/debug/dump_without_crashing.h" |
22 #include "base/environment.h" | 22 #include "base/environment.h" |
23 #include "base/memory/scoped_ptr.h" | 23 #include "base/memory/scoped_ptr.h" |
24 #include "base/strings/string16.h" | 24 #include "base/strings/string16.h" |
25 #include "base/strings/string_split.h" | 25 #include "base/strings/string_split.h" |
26 #include "base/strings/string_util.h" | 26 #include "base/strings/string_util.h" |
27 #include "base/strings/stringprintf.h" | 27 #include "base/strings/stringprintf.h" |
28 #include "base/strings/utf_string_conversions.h" | 28 #include "base/strings/utf_string_conversions.h" |
29 #include "base/synchronization/lock.h" | 29 #include "base/synchronization/lock.h" |
30 #include "base/win/metro.h" | 30 #include "base/win/metro.h" |
31 #include "base/win/pe_image.h" | 31 #include "base/win/pe_image.h" |
32 #include "base/win/registry.h" | 32 #include "base/win/registry.h" |
33 #include "base/win/win_util.h" | 33 #include "base/win/win_util.h" |
34 #include "breakpad/src/client/windows/handler/exception_handler.h" | 34 #include "breakpad/src/client/windows/handler/exception_handler.h" |
35 #include "components/breakpad/app/breakpad_client.h" | 35 #include "components/crash/app/breakpad_client.h" |
36 #include "components/breakpad/app/crash_keys_win.h" | 36 #include "components/crash/app/crash_keys_win.h" |
37 #include "components/breakpad/app/hard_error_handler_win.h" | 37 #include "components/crash/app/hard_error_handler_win.h" |
38 #include "content/public/common/result_codes.h" | 38 #include "content/public/common/result_codes.h" |
39 #include "sandbox/win/src/nt_internals.h" | 39 #include "sandbox/win/src/nt_internals.h" |
40 #include "sandbox/win/src/sidestep/preamble_patcher.h" | 40 #include "sandbox/win/src/sidestep/preamble_patcher.h" |
41 | 41 |
42 // userenv.dll is required for GetProfileType(). | 42 // userenv.dll is required for GetProfileType(). |
43 #pragma comment(lib, "userenv.lib") | 43 #pragma comment(lib, "userenv.lib") |
44 | 44 |
45 #pragma intrinsic(_AddressOfReturnAddress) | 45 #pragma intrinsic(_AddressOfReturnAddress) |
46 #pragma intrinsic(_ReturnAddress) | 46 #pragma intrinsic(_ReturnAddress) |
47 | 47 |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 // will allow the restarted process to still upload crash reports. This function | 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 | 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. | 602 // its environment from the current Chrome, will no longer contain the variable. |
603 extern "C" void __declspec(dllexport) __cdecl | 603 extern "C" void __declspec(dllexport) __cdecl |
604 ClearBreakpadPipeEnvironmentVariable() { | 604 ClearBreakpadPipeEnvironmentVariable() { |
605 scoped_ptr<base::Environment> env(base::Environment::Create()); | 605 scoped_ptr<base::Environment> env(base::Environment::Create()); |
606 env->UnSetVar(kPipeNameVar); | 606 env->UnSetVar(kPipeNameVar); |
607 } | 607 } |
608 | 608 |
609 } // namespace breakpad | 609 } // namespace breakpad |
OLD | NEW |