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 "chrome/app/chrome_main_delegate.h" | 5 #include "chrome/app/chrome_main_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 SetMacProcessName(command_line); | 638 SetMacProcessName(command_line); |
639 #endif // defined(OS_MACOSX) | 639 #endif // defined(OS_MACOSX) |
640 } | 640 } |
641 | 641 |
642 #if defined(USE_LINUX_BREAKPAD) | 642 #if defined(USE_LINUX_BREAKPAD) |
643 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain | 643 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain |
644 // sets this up for the browser process in a different manner. Zygotes | 644 // sets this up for the browser process in a different manner. Zygotes |
645 // need to call InitCrashReporter() in RunZygote(). | 645 // need to call InitCrashReporter() in RunZygote(). |
646 if (!process_type.empty() && process_type != switches::kZygoteProcess) { | 646 if (!process_type.empty() && process_type != switches::kZygoteProcess) { |
647 #if defined(OS_ANDROID) | 647 #if defined(OS_ANDROID) |
648 // On Android we need to provide a FD to the file where the minidump is | 648 InitNonBrowserCrashReporterForAndroid(); |
649 // generated as the renderer and browser run with different UIDs | |
650 // (preventing the browser from inspecting the renderer process). | |
651 int minidump_fd = base::GlobalDescriptors::GetInstance()-> | |
652 MaybeGet(kAndroidMinidumpDescriptor); | |
653 if (minidump_fd == base::kInvalidPlatformFileValue) { | |
654 NOTREACHED() << "Could not find minidump FD, crash reporting disabled."; | |
655 } else { | |
656 InitNonBrowserCrashReporterForAndroid(minidump_fd); | |
657 } | |
658 #else | 649 #else |
659 InitCrashReporter(); | 650 InitCrashReporter(); |
660 #endif | 651 #endif |
661 } | 652 } |
662 #endif | 653 #endif |
663 | 654 |
664 #if defined(OS_CHROMEOS) | 655 #if defined(OS_CHROMEOS) |
665 // Read and cache ChromeOS version from file, | 656 // Read and cache ChromeOS version from file, |
666 // to be used from inside the sandbox. | 657 // to be used from inside the sandbox. |
667 int32 major_version, minor_version, bugfix_version; | 658 int32 major_version, minor_version, bugfix_version; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 | 765 |
775 content::ContentRendererClient* | 766 content::ContentRendererClient* |
776 ChromeMainDelegate::CreateContentRendererClient() { | 767 ChromeMainDelegate::CreateContentRendererClient() { |
777 return &g_chrome_content_renderer_client.Get(); | 768 return &g_chrome_content_renderer_client.Get(); |
778 } | 769 } |
779 | 770 |
780 content::ContentUtilityClient* | 771 content::ContentUtilityClient* |
781 ChromeMainDelegate::CreateContentUtilityClient() { | 772 ChromeMainDelegate::CreateContentUtilityClient() { |
782 return &g_chrome_content_utility_client.Get(); | 773 return &g_chrome_content_utility_client.Get(); |
783 } | 774 } |
OLD | NEW |