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 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
634 // Update the process name (need resources to get the strings, so | 634 // Update the process name (need resources to get the strings, so |
635 // only do this when ResourcesBundle has been initialized). | 635 // only do this when ResourcesBundle has been initialized). |
636 SetMacProcessName(command_line); | 636 SetMacProcessName(command_line); |
637 #endif // defined(OS_MACOSX) | 637 #endif // defined(OS_MACOSX) |
638 } | 638 } |
639 | 639 |
640 #if defined(USE_LINUX_BREAKPAD) | 640 #if defined(USE_LINUX_BREAKPAD) |
641 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain | 641 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain |
642 // sets this up for the browser process in a different manner. Zygotes | 642 // sets this up for the browser process in a different manner. Zygotes |
643 // need to call InitCrashReporter() in RunZygote(). | 643 // need to call InitCrashReporter() in RunZygote(). |
644 if (!process_type.empty() && process_type != switches::kZygoteProcess) | 644 if (!process_type.empty() && process_type != switches::kZygoteProcess) { |
645 #if defined(OS_ANDROID) | |
646 // On Android we need to provide a FD to the file where the minidump is | |
647 // generated as the renderer and browser run with different UIDs | |
Lei Zhang
2012/10/23 02:57:34
nit: "run with"
Jay Civelli
2012/10/23 20:39:55
Done.
| |
648 // (preventing the browser from inspecting the renderer process). | |
649 int minidump_fd = base::GlobalDescriptors::GetInstance()-> | |
650 MaybeGet(kAndroidMinidumpDescriptor); | |
651 if (minidump_fd == base::kInvalidPlatformFileValue) { | |
652 NOTREACHED() << "Could not find minidump FD, crash reporting disabled."; | |
653 } else { | |
654 InitNonBrowserCrashReporterForAndroid(minidump_fd); | |
655 } | |
656 #else | |
645 InitCrashReporter(); | 657 InitCrashReporter(); |
646 #endif | 658 #endif |
659 } | |
660 #endif | |
647 | 661 |
648 #if defined(OS_CHROMEOS) | 662 #if defined(OS_CHROMEOS) |
649 // Read and cache ChromeOS version from file, | 663 // Read and cache ChromeOS version from file, |
650 // to be used from inside the sandbox. | 664 // to be used from inside the sandbox. |
651 int32 major_version, minor_version, bugfix_version; | 665 int32 major_version, minor_version, bugfix_version; |
652 base::SysInfo::OperatingSystemVersionNumbers( | 666 base::SysInfo::OperatingSystemVersionNumbers( |
653 &major_version, &minor_version, &bugfix_version); | 667 &major_version, &minor_version, &bugfix_version); |
654 #endif | 668 #endif |
655 } | 669 } |
656 | 670 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
758 | 772 |
759 content::ContentRendererClient* | 773 content::ContentRendererClient* |
760 ChromeMainDelegate::CreateContentRendererClient() { | 774 ChromeMainDelegate::CreateContentRendererClient() { |
761 return &g_chrome_content_renderer_client.Get(); | 775 return &g_chrome_content_renderer_client.Get(); |
762 } | 776 } |
763 | 777 |
764 content::ContentUtilityClient* | 778 content::ContentUtilityClient* |
765 ChromeMainDelegate::CreateContentUtilityClient() { | 779 ChromeMainDelegate::CreateContentUtilityClient() { |
766 return &g_chrome_content_utility_client.Get(); | 780 return &g_chrome_content_utility_client.Get(); |
767 } | 781 } |
OLD | NEW |