OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/app/breakpad_win.h" | 5 #include "chrome/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 | 10 |
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 | 672 |
673 // Get the alternate dump directory. We use the temp path. | 673 // Get the alternate dump directory. We use the temp path. |
674 wchar_t temp_dir[MAX_PATH] = {0}; | 674 wchar_t temp_dir[MAX_PATH] = {0}; |
675 ::GetTempPathW(MAX_PATH, temp_dir); | 675 ::GetTempPathW(MAX_PATH, temp_dir); |
676 | 676 |
677 MINIDUMP_TYPE dump_type = kSmallDumpType; | 677 MINIDUMP_TYPE dump_type = kSmallDumpType; |
678 // Capture full memory if explicitly instructed to. | 678 // Capture full memory if explicitly instructed to. |
679 if (command.HasSwitch(switches::kFullMemoryCrashReport)) { | 679 if (command.HasSwitch(switches::kFullMemoryCrashReport)) { |
680 dump_type = kFullDumpType; | 680 dump_type = kFullDumpType; |
681 } else { | 681 } else { |
| 682 std::wstring channel_name( |
| 683 GoogleUpdateSettings::GetChromeChannel(!is_per_user_install)); |
| 684 |
682 // Capture more detail in crash dumps for beta and dev channel builds. | 685 // Capture more detail in crash dumps for beta and dev channel builds. |
683 if (channel_string == L"dev" || channel_string == L"beta" || | 686 if (channel_name == L"dev" || channel_name == L"beta" || |
684 channel_string == GoogleChromeSxSDistribution::ChannelName()) | 687 channel_name == GoogleChromeSxSDistribution::ChannelName()) |
685 dump_type = kLargerDumpType; | 688 dump_type = kLargerDumpType; |
686 } | 689 } |
687 | 690 |
688 g_breakpad = new google_breakpad::ExceptionHandler(temp_dir, &FilterCallback, | 691 g_breakpad = new google_breakpad::ExceptionHandler(temp_dir, &FilterCallback, |
689 callback, NULL, | 692 callback, NULL, |
690 google_breakpad::ExceptionHandler::HANDLER_ALL, | 693 google_breakpad::ExceptionHandler::HANDLER_ALL, |
691 dump_type, pipe_name.c_str(), info->custom_info); | 694 dump_type, pipe_name.c_str(), info->custom_info); |
692 | 695 |
693 if (!g_breakpad->IsOutOfProcess()) { | 696 if (!g_breakpad->IsOutOfProcess()) { |
694 // The out-of-process handler is unavailable. | 697 // The out-of-process handler is unavailable. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 if (QueueUserWorkItem( | 737 if (QueueUserWorkItem( |
735 &InitCrashReporterThread, | 738 &InitCrashReporterThread, |
736 info, | 739 info, |
737 WT_EXECUTELONGFUNCTION) == 0) { | 740 WT_EXECUTELONGFUNCTION) == 0) { |
738 // We failed to queue to the worker pool, initialize in this thread. | 741 // We failed to queue to the worker pool, initialize in this thread. |
739 InitCrashReporterThread(info); | 742 InitCrashReporterThread(info); |
740 } | 743 } |
741 } | 744 } |
742 } | 745 } |
743 } | 746 } |
OLD | NEW |