| 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/cpu.h" | 8 #include "base/cpu.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 #endif | 64 #endif |
| 65 | 65 |
| 66 #if defined(OS_POSIX) | 66 #if defined(OS_POSIX) |
| 67 #include <locale.h> | 67 #include <locale.h> |
| 68 #include <signal.h> | 68 #include <signal.h> |
| 69 #include "chrome/app/chrome_breakpad_client.h" | 69 #include "chrome/app/chrome_breakpad_client.h" |
| 70 #include "components/breakpad/app/breakpad_client.h" | 70 #include "components/breakpad/app/breakpad_client.h" |
| 71 #endif | 71 #endif |
| 72 | 72 |
| 73 #if !defined(DISABLE_NACL) && defined(OS_LINUX) | 73 #if !defined(DISABLE_NACL) && defined(OS_LINUX) |
| 74 #include "components/nacl/app/nacl_fork_delegates_linux.h" |
| 74 #include "components/nacl/common/nacl_paths.h" | 75 #include "components/nacl/common/nacl_paths.h" |
| 75 #include "components/nacl/zygote/nacl_fork_delegate_linux.h" | |
| 76 #endif | 76 #endif |
| 77 | 77 |
| 78 #if defined(OS_CHROMEOS) | 78 #if defined(OS_CHROMEOS) |
| 79 #include "base/sys_info.h" | 79 #include "base/sys_info.h" |
| 80 #include "chrome/browser/chromeos/boot_times_loader.h" | 80 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 81 #include "chromeos/chromeos_paths.h" | 81 #include "chromeos/chromeos_paths.h" |
| 82 #include "chromeos/chromeos_switches.h" | 82 #include "chromeos/chromeos_switches.h" |
| 83 #endif | 83 #endif |
| 84 | 84 |
| 85 #if defined(OS_ANDROID) | 85 #if defined(OS_ANDROID) |
| (...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 const std::string& process_type) { | 851 const std::string& process_type) { |
| 852 // NaClLoader does this in NaClMainPlatformDelegate::EnableSandbox(). | 852 // NaClLoader does this in NaClMainPlatformDelegate::EnableSandbox(). |
| 853 // No sandbox needed for relauncher. | 853 // No sandbox needed for relauncher. |
| 854 return process_type == switches::kNaClLoaderProcess || | 854 return process_type == switches::kNaClLoaderProcess || |
| 855 process_type == switches::kRelauncherProcess; | 855 process_type == switches::kRelauncherProcess; |
| 856 } | 856 } |
| 857 #elif defined(OS_POSIX) && !defined(OS_ANDROID) | 857 #elif defined(OS_POSIX) && !defined(OS_ANDROID) |
| 858 void ChromeMainDelegate::ZygoteStarting( | 858 void ChromeMainDelegate::ZygoteStarting( |
| 859 ScopedVector<content::ZygoteForkDelegate>* delegates) { | 859 ScopedVector<content::ZygoteForkDelegate>* delegates) { |
| 860 #if !defined(DISABLE_NACL) | 860 #if !defined(DISABLE_NACL) |
| 861 delegates->push_back(new NaClForkDelegate()); | 861 nacl::AddNaClZygoteForkDelegates(delegates); |
| 862 #endif | 862 #endif |
| 863 } | 863 } |
| 864 | 864 |
| 865 void ChromeMainDelegate::ZygoteForked() { | 865 void ChromeMainDelegate::ZygoteForked() { |
| 866 Profiling::ProcessStarted(); | 866 Profiling::ProcessStarted(); |
| 867 if (Profiling::BeingProfiled()) { | 867 if (Profiling::BeingProfiled()) { |
| 868 base::debug::RestartProfilingAfterFork(); | 868 base::debug::RestartProfilingAfterFork(); |
| 869 SetUpProfilingShutdownHandler(); | 869 SetUpProfilingShutdownHandler(); |
| 870 } | 870 } |
| 871 | 871 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 } | 909 } |
| 910 | 910 |
| 911 content::ContentUtilityClient* | 911 content::ContentUtilityClient* |
| 912 ChromeMainDelegate::CreateContentUtilityClient() { | 912 ChromeMainDelegate::CreateContentUtilityClient() { |
| 913 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 913 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
| 914 return NULL; | 914 return NULL; |
| 915 #else | 915 #else |
| 916 return g_chrome_content_utility_client.Pointer(); | 916 return g_chrome_content_utility_client.Pointer(); |
| 917 #endif | 917 #endif |
| 918 } | 918 } |
| OLD | NEW |