| 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/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/cpu.h" | 9 #include "base/cpu.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "chrome/browser/chrome_content_browser_client.h" | 24 #include "chrome/browser/chrome_content_browser_client.h" |
| 25 #include "chrome/browser/defaults.h" | 25 #include "chrome/browser/defaults.h" |
| 26 #include "chrome/common/channel_info.h" | 26 #include "chrome/common/channel_info.h" |
| 27 #include "chrome/common/chrome_constants.h" | 27 #include "chrome/common/chrome_constants.h" |
| 28 #include "chrome/common/chrome_content_client.h" | 28 #include "chrome/common/chrome_content_client.h" |
| 29 #include "chrome/common/chrome_paths.h" | 29 #include "chrome/common/chrome_paths.h" |
| 30 #include "chrome/common/chrome_paths_internal.h" | 30 #include "chrome/common/chrome_paths_internal.h" |
| 31 #include "chrome/common/chrome_result_codes.h" | 31 #include "chrome/common/chrome_result_codes.h" |
| 32 #include "chrome/common/chrome_switches.h" | 32 #include "chrome/common/chrome_switches.h" |
| 33 #include "chrome/common/crash_keys.h" | 33 #include "chrome/common/crash_keys.h" |
| 34 #include "chrome/common/features.h" |
| 34 #include "chrome/common/logging_chrome.h" | 35 #include "chrome/common/logging_chrome.h" |
| 35 #include "chrome/common/profiling.h" | 36 #include "chrome/common/profiling.h" |
| 36 #include "chrome/common/switch_utils.h" | 37 #include "chrome/common/switch_utils.h" |
| 37 #include "chrome/common/trace_event_args_whitelist.h" | 38 #include "chrome/common/trace_event_args_whitelist.h" |
| 38 #include "chrome/common/url_constants.h" | 39 #include "chrome/common/url_constants.h" |
| 39 #include "chrome/plugin/chrome_content_plugin_client.h" | 40 #include "chrome/plugin/chrome_content_plugin_client.h" |
| 40 #include "chrome/renderer/chrome_content_renderer_client.h" | 41 #include "chrome/renderer/chrome_content_renderer_client.h" |
| 41 #include "chrome/utility/chrome_content_utility_client.h" | 42 #include "chrome/utility/chrome_content_utility_client.h" |
| 42 #include "components/component_updater/component_updater_paths.h" | 43 #include "components/component_updater/component_updater_paths.h" |
| 43 #include "components/content_settings/core/common/content_settings_pattern.h" | 44 #include "components/content_settings/core/common/content_settings_pattern.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 #include "components/nacl/zygote/nacl_fork_delegate_linux.h" | 83 #include "components/nacl/zygote/nacl_fork_delegate_linux.h" |
| 83 #endif | 84 #endif |
| 84 | 85 |
| 85 #if defined(OS_CHROMEOS) | 86 #if defined(OS_CHROMEOS) |
| 86 #include "base/sys_info.h" | 87 #include "base/sys_info.h" |
| 87 #include "chrome/browser/chromeos/boot_times_recorder.h" | 88 #include "chrome/browser/chromeos/boot_times_recorder.h" |
| 88 #include "chromeos/chromeos_paths.h" | 89 #include "chromeos/chromeos_paths.h" |
| 89 #include "chromeos/chromeos_switches.h" | 90 #include "chromeos/chromeos_switches.h" |
| 90 #endif | 91 #endif |
| 91 | 92 |
| 93 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 94 #include "chrome/browser/android/java_exception_reporter.h" |
| 95 #endif |
| 96 |
| 92 #if defined(OS_ANDROID) | 97 #if defined(OS_ANDROID) |
| 93 #include "chrome/browser/android/java_exception_reporter.h" | |
| 94 #include "chrome/common/descriptors_android.h" | 98 #include "chrome/common/descriptors_android.h" |
| 95 #else | 99 #else |
| 96 // Diagnostics is only available on non-android platforms. | 100 // Diagnostics is only available on non-android platforms. |
| 97 #include "chrome/browser/diagnostics/diagnostics_controller.h" | 101 #include "chrome/browser/diagnostics/diagnostics_controller.h" |
| 98 #include "chrome/browser/diagnostics/diagnostics_writer.h" | 102 #include "chrome/browser/diagnostics/diagnostics_writer.h" |
| 99 #endif | 103 #endif |
| 100 | 104 |
| 101 #if defined(USE_X11) | 105 #if defined(USE_X11) |
| 102 #include <stdlib.h> | 106 #include <stdlib.h> |
| 103 #include <string.h> | 107 #include <string.h> |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 | 799 |
| 796 chrome::InitializePDF(); | 800 chrome::InitializePDF(); |
| 797 #endif | 801 #endif |
| 798 | 802 |
| 799 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 803 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 800 // Zygote needs to call InitCrashReporter() in RunZygote(). | 804 // Zygote needs to call InitCrashReporter() in RunZygote(). |
| 801 if (process_type != switches::kZygoteProcess) { | 805 if (process_type != switches::kZygoteProcess) { |
| 802 #if defined(OS_ANDROID) | 806 #if defined(OS_ANDROID) |
| 803 if (process_type.empty()) { | 807 if (process_type.empty()) { |
| 804 breakpad::InitCrashReporter(process_type); | 808 breakpad::InitCrashReporter(process_type); |
| 809 // TODO(crbug.com/551176): Exception reporting should work without |
| 810 // ANDROID_JAVA_UI |
| 811 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 805 chrome::android::InitJavaExceptionReporter(); | 812 chrome::android::InitJavaExceptionReporter(); |
| 813 #endif |
| 806 } else { | 814 } else { |
| 807 breakpad::InitNonBrowserCrashReporterForAndroid(process_type); | 815 breakpad::InitNonBrowserCrashReporterForAndroid(process_type); |
| 808 } | 816 } |
| 809 #else // !defined(OS_ANDROID) | 817 #else // !defined(OS_ANDROID) |
| 810 breakpad::InitCrashReporter(process_type); | 818 breakpad::InitCrashReporter(process_type); |
| 811 #endif // defined(OS_ANDROID) | 819 #endif // defined(OS_ANDROID) |
| 812 } | 820 } |
| 813 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 821 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) |
| 814 | 822 |
| 815 // After all the platform Breakpads have been initialized, store the command | 823 // After all the platform Breakpads have been initialized, store the command |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 case version_info::Channel::CANARY: | 998 case version_info::Channel::CANARY: |
| 991 return true; | 999 return true; |
| 992 case version_info::Channel::DEV: | 1000 case version_info::Channel::DEV: |
| 993 case version_info::Channel::BETA: | 1001 case version_info::Channel::BETA: |
| 994 case version_info::Channel::STABLE: | 1002 case version_info::Channel::STABLE: |
| 995 default: | 1003 default: |
| 996 // Don't enable instrumentation. | 1004 // Don't enable instrumentation. |
| 997 return false; | 1005 return false; |
| 998 } | 1006 } |
| 999 } | 1007 } |
| OLD | NEW |