OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "win8/delegate_execute/crash_server_init.h" | 5 #include "win8/delegate_execute/crash_server_init.h" |
6 | 6 |
7 #include <shlobj.h> | 7 #include <shlobj.h> |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include <cwchar> | 10 #include <cwchar> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 entries, ARRAYSIZE(entries) }; | 61 entries, ARRAYSIZE(entries) }; |
62 return &custom_info; | 62 return &custom_info; |
63 } | 63 } |
64 | 64 |
65 } // namespace | 65 } // namespace |
66 | 66 |
67 namespace delegate_execute { | 67 namespace delegate_execute { |
68 | 68 |
69 scoped_ptr<google_breakpad::ExceptionHandler> InitializeCrashReporting() { | 69 scoped_ptr<google_breakpad::ExceptionHandler> InitializeCrashReporting() { |
70 wchar_t temp_path[MAX_PATH + 1] = {0}; | 70 wchar_t temp_path[MAX_PATH + 1] = {0}; |
71 DWORD path_len = ::GetTempPath(MAX_PATH, temp_path); | 71 ::GetTempPath(MAX_PATH, temp_path); |
72 | 72 |
73 base::string16 pipe_name; | 73 base::string16 pipe_name; |
74 pipe_name = kGoogleUpdatePipeName; | 74 pipe_name = kGoogleUpdatePipeName; |
75 if (IsRunningSystemInstall()) { | 75 if (IsRunningSystemInstall()) { |
76 pipe_name += kSystemPrincipalSid; | 76 pipe_name += kSystemPrincipalSid; |
77 } else { | 77 } else { |
78 base::string16 user_sid; | 78 base::string16 user_sid; |
79 if (base::win::GetUserSidString(&user_sid)) { | 79 if (base::win::GetUserSidString(&user_sid)) { |
80 pipe_name += user_sid; | 80 pipe_name += user_sid; |
81 } else { | 81 } else { |
82 // We don't think we're a system install, but we couldn't get the | 82 // We don't think we're a system install, but we couldn't get the |
83 // user SID. Try connecting to the system-level crash service as a | 83 // user SID. Try connecting to the system-level crash service as a |
84 // last ditch effort. | 84 // last ditch effort. |
85 pipe_name += kSystemPrincipalSid; | 85 pipe_name += kSystemPrincipalSid; |
86 } | 86 } |
87 } | 87 } |
88 | 88 |
89 return scoped_ptr<google_breakpad::ExceptionHandler>( | 89 return scoped_ptr<google_breakpad::ExceptionHandler>( |
90 new google_breakpad::ExceptionHandler( | 90 new google_breakpad::ExceptionHandler( |
91 temp_path, NULL, NULL, NULL, | 91 temp_path, NULL, NULL, NULL, |
92 google_breakpad::ExceptionHandler::HANDLER_ALL, kLargerDumpType, | 92 google_breakpad::ExceptionHandler::HANDLER_ALL, kLargerDumpType, |
93 pipe_name.c_str(), GetCustomInfo())); | 93 pipe_name.c_str(), GetCustomInfo())); |
94 } | 94 } |
95 | 95 |
96 } // namespace delegate_execute | 96 } // namespace delegate_execute |
OLD | NEW |