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