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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 if (!base::win::GetUserSidString(&user_sid)) { | 646 if (!base::win::GetUserSidString(&user_sid)) { |
647 return; | 647 return; |
648 } | 648 } |
649 } else { | 649 } else { |
650 user_sid = kSystemPrincipalSid; | 650 user_sid = kSystemPrincipalSid; |
651 } | 651 } |
652 | 652 |
653 pipe_name = kGoogleUpdatePipeName; | 653 pipe_name = kGoogleUpdatePipeName; |
654 pipe_name += user_sid; | 654 pipe_name += user_sid; |
655 } | 655 } |
656 env->SetVar(kPipeNameVar, WideToASCII(pipe_name)); | 656 env->SetVar(kPipeNameVar, base::UTF16ToASCII(pipe_name)); |
657 } | 657 } |
658 | 658 |
659 void InitDefaultCrashCallback(LPTOP_LEVEL_EXCEPTION_FILTER filter) { | 659 void InitDefaultCrashCallback(LPTOP_LEVEL_EXCEPTION_FILTER filter) { |
660 previous_filter = SetUnhandledExceptionFilter(filter); | 660 previous_filter = SetUnhandledExceptionFilter(filter); |
661 } | 661 } |
662 | 662 |
663 void InitCrashReporter(const std::string& process_type_switch) { | 663 void InitCrashReporter(const std::string& process_type_switch) { |
664 const CommandLine& command = *CommandLine::ForCurrentProcess(); | 664 const CommandLine& command = *CommandLine::ForCurrentProcess(); |
665 if (command.HasSwitch(switches::kDisableBreakpad)) | 665 if (command.HasSwitch(switches::kDisableBreakpad)) |
666 return; | 666 return; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 if (process_type != L"browser" && | 760 if (process_type != L"browser" && |
761 !GetBreakpadClient()->IsRunningUnattended()) { | 761 !GetBreakpadClient()->IsRunningUnattended()) { |
762 // Initialize the hook TerminateProcess to catch unexpected exits. | 762 // Initialize the hook TerminateProcess to catch unexpected exits. |
763 InitTerminateProcessHooks(); | 763 InitTerminateProcessHooks(); |
764 } | 764 } |
765 #endif | 765 #endif |
766 } | 766 } |
767 } | 767 } |
768 | 768 |
769 } // namespace breakpad | 769 } // namespace breakpad |
OLD | NEW |