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

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

Issue 434077: Add regex escaping code to Mac sandbox implementation and re-enable the utility process on OS X. (Closed)
Patch Set: Sync to trunk Created 11 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 } 547 }
548 #endif // NDEBUG 548 #endif // NDEBUG
549 549
550 if (!process_type.empty()) 550 if (!process_type.empty())
551 CommonSubprocessInit(); 551 CommonSubprocessInit();
552 552
553 #if defined (OS_MACOSX) 553 #if defined (OS_MACOSX)
554 // On OS X the renderer sandbox needs to be initialized later in the startup 554 // On OS X the renderer sandbox needs to be initialized later in the startup
555 // sequence in RendererMainPlatformDelegate::PlatformInitialize(). 555 // sequence in RendererMainPlatformDelegate::PlatformInitialize().
556 if (process_type != switches::kRendererProcess && 556 if (process_type != switches::kRendererProcess &&
557 process_type != switches::kExtensionProcess) 557 process_type != switches::kExtensionProcess) {
558 sandbox_wrapper.InitializeSandbox(parsed_command_line, process_type); 558 bool sandbox_initialized_ok =
559 sandbox_wrapper.InitializeSandbox(parsed_command_line, process_type);
560 // Die if the sandbox can't be enabled.
561 CHECK(sandbox_initialized_ok) << "Error initializing sandbox for "
562 << process_type;
563 }
559 #endif // OS_MACOSX 564 #endif // OS_MACOSX
560 565
561 startup_timer.Stop(); // End of Startup Time Measurement. 566 startup_timer.Stop(); // End of Startup Time Measurement.
562 567
563 MainFunctionParams main_params(parsed_command_line, sandbox_wrapper, 568 MainFunctionParams main_params(parsed_command_line, sandbox_wrapper,
564 &autorelease_pool); 569 &autorelease_pool);
565 570
566 // TODO(port): turn on these main() functions as they've been de-winified. 571 // TODO(port): turn on these main() functions as they've been de-winified.
567 int rv = -1; 572 int rv = -1;
568 if (process_type == switches::kRendererProcess) { 573 if (process_type == switches::kRendererProcess) {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 671
667 logging::CleanupChromeLogging(); 672 logging::CleanupChromeLogging();
668 673
669 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) 674 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD)
670 // TODO(mark): See the TODO(mark) above at InitCrashReporter. 675 // TODO(mark): See the TODO(mark) above at InitCrashReporter.
671 DestructCrashReporter(); 676 DestructCrashReporter();
672 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD 677 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD
673 678
674 return rv; 679 return rv;
675 } 680 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_updater.cc » ('j') | chrome/common/sandbox_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698