Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: chrome/app/chrome_main.cc

Issue 5491001: Mac: Sandbox GPU process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make tests work for now Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/gpu.sb » ('j') | chrome/common/child_process.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "app/app_paths.h" 5 #include "app/app_paths.h"
6 #include "app/app_switches.h" 6 #include "app/app_switches.h"
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/debugger.h" 10 #include "base/debug/debugger.h"
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 SetMacProcessName(process_type); 867 SetMacProcessName(process_type);
868 #endif // defined(OS_MACOSX) 868 #endif // defined(OS_MACOSX)
869 } 869 }
870 870
871 if (!process_type.empty()) 871 if (!process_type.empty())
872 CommonSubprocessInit(); 872 CommonSubprocessInit();
873 873
874 #if defined(OS_MACOSX) 874 #if defined(OS_MACOSX)
875 // On OS X the renderer sandbox needs to be initialized later in the startup 875 // On OS X the renderer sandbox needs to be initialized later in the startup
876 // sequence in RendererMainPlatformDelegate::EnableSandbox(). 876 // sequence in RendererMainPlatformDelegate::EnableSandbox().
877 // Same goes for NaClLoader, in NaClMainPlatformDelegate::EnableSandbox(). 877 // Same goes for NaClLoader, in NaClMainPlatformDelegate::EnableSandbox(),
878 // and the GPU process, in GpuMain().
878 if (process_type != switches::kRendererProcess && 879 if (process_type != switches::kRendererProcess &&
879 process_type != switches::kExtensionProcess && 880 process_type != switches::kExtensionProcess &&
880 process_type != switches::kNaClLoaderProcess) { 881 process_type != switches::kNaClLoaderProcess &&
882 process_type != switches::kGpuProcess) {
881 bool sandbox_initialized_ok = 883 bool sandbox_initialized_ok =
882 sandbox_wrapper.InitializeSandbox(parsed_command_line, process_type); 884 sandbox_wrapper.InitializeSandbox(parsed_command_line, process_type);
883 // Die if the sandbox can't be enabled. 885 // Die if the sandbox can't be enabled.
884 CHECK(sandbox_initialized_ok) << "Error initializing sandbox for " 886 CHECK(sandbox_initialized_ok) << "Error initializing sandbox for "
885 << process_type; 887 << process_type;
886 } 888 }
887 #endif // OS_MACOSX 889 #endif // OS_MACOSX
888 890
889 startup_timer.Stop(); // End of Startup Time Measurement. 891 startup_timer.Stop(); // End of Startup Time Measurement.
890 892
(...skipping 11 matching lines...) Expand all
902 904
903 int exit_code = RunNamedProcessTypeMain(process_type, main_params); 905 int exit_code = RunNamedProcessTypeMain(process_type, main_params);
904 906
905 if (SubprocessNeedsResourceBundle(process_type)) 907 if (SubprocessNeedsResourceBundle(process_type))
906 ResourceBundle::CleanupSharedInstance(); 908 ResourceBundle::CleanupSharedInstance();
907 909
908 LowLevelShutdown(); 910 LowLevelShutdown();
909 911
910 return exit_code; 912 return exit_code;
911 } 913 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gpu.sb » ('j') | chrome/common/child_process.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698