| 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 29 matching lines...) Expand all Loading... |
| 40 #include "content/public/common/content_paths.h" | 40 #include "content/public/common/content_paths.h" |
| 41 #include "extensions/common/constants.h" | 41 #include "extensions/common/constants.h" |
| 42 #include "ui/base/ui_base_switches.h" | 42 #include "ui/base/ui_base_switches.h" |
| 43 | 43 |
| 44 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
| 45 #include <atlbase.h> | 45 #include <atlbase.h> |
| 46 #include <malloc.h> | 46 #include <malloc.h> |
| 47 #include <algorithm> | 47 #include <algorithm> |
| 48 #include "chrome/app/close_handle_hook_win.h" | 48 #include "chrome/app/close_handle_hook_win.h" |
| 49 #include "chrome/common/child_process_logging.h" | 49 #include "chrome/common/child_process_logging.h" |
| 50 #include "chrome/common/terminate_on_heap_corruption_experiment_win.h" | |
| 51 #include "chrome/common/v8_breakpad_support_win.h" | 50 #include "chrome/common/v8_breakpad_support_win.h" |
| 52 #include "sandbox/win/src/sandbox.h" | 51 #include "sandbox/win/src/sandbox.h" |
| 53 #include "ui/base/resource/resource_bundle_win.h" | 52 #include "ui/base/resource/resource_bundle_win.h" |
| 54 #endif | 53 #endif |
| 55 | 54 |
| 56 #if defined(OS_MACOSX) | 55 #if defined(OS_MACOSX) |
| 57 #include "base/mac/foundation_util.h" | 56 #include "base/mac/foundation_util.h" |
| 58 #include "base/mac/os_crash_dumps.h" | 57 #include "base/mac/os_crash_dumps.h" |
| 59 #include "chrome/app/chrome_main_mac.h" | 58 #include "chrome/app/chrome_main_mac.h" |
| 60 #include "chrome/browser/mac/relauncher.h" | 59 #include "chrome/browser/mac/relauncher.h" |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 std::string process_type = | 930 std::string process_type = |
| 932 command_line->GetSwitchValueASCII(switches::kProcessType); | 931 command_line->GetSwitchValueASCII(switches::kProcessType); |
| 933 breakpad::InitCrashReporter(process_type); | 932 breakpad::InitCrashReporter(process_type); |
| 934 | 933 |
| 935 // Reset the command line for the newly spawned process. | 934 // Reset the command line for the newly spawned process. |
| 936 crash_keys::SetSwitchesFromCommandLine(command_line); | 935 crash_keys::SetSwitchesFromCommandLine(command_line); |
| 937 } | 936 } |
| 938 | 937 |
| 939 #endif // OS_MACOSX | 938 #endif // OS_MACOSX |
| 940 | 939 |
| 941 #if defined(OS_WIN) | |
| 942 bool ChromeMainDelegate::ShouldEnableTerminationOnHeapCorruption() { | |
| 943 return !ShouldExperimentallyDisableTerminateOnHeapCorruption(); | |
| 944 } | |
| 945 #endif // OS_WIN | |
| 946 | |
| 947 content::ContentBrowserClient* | 940 content::ContentBrowserClient* |
| 948 ChromeMainDelegate::CreateContentBrowserClient() { | 941 ChromeMainDelegate::CreateContentBrowserClient() { |
| 949 #if defined(CHROME_MULTIPLE_DLL_CHILD) | 942 #if defined(CHROME_MULTIPLE_DLL_CHILD) |
| 950 return NULL; | 943 return NULL; |
| 951 #else | 944 #else |
| 952 return g_chrome_content_browser_client.Pointer(); | 945 return g_chrome_content_browser_client.Pointer(); |
| 953 #endif | 946 #endif |
| 954 } | 947 } |
| 955 | 948 |
| 956 content::ContentPluginClient* ChromeMainDelegate::CreateContentPluginClient() { | 949 content::ContentPluginClient* ChromeMainDelegate::CreateContentPluginClient() { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 971 } | 964 } |
| 972 | 965 |
| 973 content::ContentUtilityClient* | 966 content::ContentUtilityClient* |
| 974 ChromeMainDelegate::CreateContentUtilityClient() { | 967 ChromeMainDelegate::CreateContentUtilityClient() { |
| 975 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 968 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
| 976 return NULL; | 969 return NULL; |
| 977 #else | 970 #else |
| 978 return g_chrome_content_utility_client.Pointer(); | 971 return g_chrome_content_utility_client.Pointer(); |
| 979 #endif | 972 #endif |
| 980 } | 973 } |
| OLD | NEW |