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

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

Issue 269413004: Add support for multiple zygote fork delegates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: IWYU Created 6 years, 7 months 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 | « chrome/app/chrome_main_delegate.h ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 } 848 }
849 849
850 bool ChromeMainDelegate::DelaySandboxInitialization( 850 bool ChromeMainDelegate::DelaySandboxInitialization(
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 content::ZygoteForkDelegate* ChromeMainDelegate::ZygoteStarting() { 858 void ChromeMainDelegate::ZygoteStarting(
859 #if defined(DISABLE_NACL) 859 ScopedVector<content::ZygoteForkDelegate>* delegates) {
860 return NULL; 860 #if !defined(DISABLE_NACL)
861 #else 861 delegates->push_back(new NaClForkDelegate());
862 return new NaClForkDelegate();
863 #endif 862 #endif
864 } 863 }
865 864
866 void ChromeMainDelegate::ZygoteForked() { 865 void ChromeMainDelegate::ZygoteForked() {
867 Profiling::ProcessStarted(); 866 Profiling::ProcessStarted();
868 if (Profiling::BeingProfiled()) { 867 if (Profiling::BeingProfiled()) {
869 base::debug::RestartProfilingAfterFork(); 868 base::debug::RestartProfilingAfterFork();
870 SetUpProfilingShutdownHandler(); 869 SetUpProfilingShutdownHandler();
871 } 870 }
872 871
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 } 909 }
911 910
912 content::ContentUtilityClient* 911 content::ContentUtilityClient*
913 ChromeMainDelegate::CreateContentUtilityClient() { 912 ChromeMainDelegate::CreateContentUtilityClient() {
914 #if defined(CHROME_MULTIPLE_DLL_BROWSER) 913 #if defined(CHROME_MULTIPLE_DLL_BROWSER)
915 return NULL; 914 return NULL;
916 #else 915 #else
917 return g_chrome_content_utility_client.Pointer(); 916 return g_chrome_content_utility_client.Pointer();
918 #endif 917 #endif
919 } 918 }
OLDNEW
« no previous file with comments | « chrome/app/chrome_main_delegate.h ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698