OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // TODO(port): the ifdefs in here are a first step towards trying to determine | 5 // TODO(port): the ifdefs in here are a first step towards trying to determine |
6 // the correct abstraction for all the OS functionality required at this | 6 // the correct abstraction for all the OS functionality required at this |
7 // stage of process initialization. It should not be taken as a final | 7 // stage of process initialization. It should not be taken as a final |
8 // abstraction. | 8 // abstraction. |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 std::string sandbox_cmd; | 919 std::string sandbox_cmd; |
920 if (sandbox_binary && !parsed_command_line.HasSwitch(switches::kNoSandbox)) | 920 if (sandbox_binary && !parsed_command_line.HasSwitch(switches::kNoSandbox)) |
921 sandbox_cmd = sandbox_binary; | 921 sandbox_cmd = sandbox_binary; |
922 | 922 |
923 // Tickle the sandbox host and zygote host so they fork now. | 923 // Tickle the sandbox host and zygote host so they fork now. |
924 RenderSandboxHostLinux* shost = Singleton<RenderSandboxHostLinux>::get(); | 924 RenderSandboxHostLinux* shost = Singleton<RenderSandboxHostLinux>::get(); |
925 shost->Init(sandbox_cmd); | 925 shost->Init(sandbox_cmd); |
926 ZygoteHost* zhost = Singleton<ZygoteHost>::get(); | 926 ZygoteHost* zhost = Singleton<ZygoteHost>::get(); |
927 zhost->Init(sandbox_cmd); | 927 zhost->Init(sandbox_cmd); |
928 | 928 |
| 929 #if defined(USE_NSS) |
929 // We want to be sure to init NSPR on the main thread. | 930 // We want to be sure to init NSPR on the main thread. |
930 base::EnsureNSPRInit(); | 931 base::EnsureNSPRInit(); |
| 932 #endif |
931 | 933 |
932 g_thread_init(NULL); | 934 g_thread_init(NULL); |
933 // Glib type system initialization. Needed at least for gconf, | 935 // Glib type system initialization. Needed at least for gconf, |
934 // used in net/proxy/proxy_config_service_linux.cc. Most likely | 936 // used in net/proxy/proxy_config_service_linux.cc. Most likely |
935 // this is superfluous as gtk_init() ought to do this. It's | 937 // this is superfluous as gtk_init() ought to do this. It's |
936 // definitely harmless, so retained as a reminder of this | 938 // definitely harmless, so retained as a reminder of this |
937 // requirement for gconf. | 939 // requirement for gconf. |
938 g_type_init(); | 940 g_type_init(); |
939 // We use glib-dbus for geolocation and it's possible other libraries | 941 // We use glib-dbus for geolocation and it's possible other libraries |
940 // (e.g. gnome-keyring) will use it, so initialize its threading here | 942 // (e.g. gnome-keyring) will use it, so initialize its threading here |
(...skipping 24 matching lines...) Expand all Loading... |
965 | 967 |
966 logging::CleanupChromeLogging(); | 968 logging::CleanupChromeLogging(); |
967 | 969 |
968 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) | 970 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) |
969 // TODO(mark): See the TODO(mark) above at InitCrashReporter. | 971 // TODO(mark): See the TODO(mark) above at InitCrashReporter. |
970 DestructCrashReporter(); | 972 DestructCrashReporter(); |
971 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD | 973 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD |
972 | 974 |
973 return rv; | 975 return rv; |
974 } | 976 } |
OLD | NEW |