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

Side by Side Diff: content/app/content_main_runner.cc

Issue 65193003: Clear SingleProcess and InProcessGPU logic. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Add CommandLine::RemoveSwitch() to prevent --single-process when CHROME_MULTIPLE_DLL_BROWSER Created 7 years, 1 month 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
« no previous file with comments | « base/command_line_unittest.cc ('k') | content/browser/gpu/gpu_process_host.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 "content/public/app/content_main_runner.h" 5 #include "content/public/app/content_main_runner.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "base/allocator/allocator_extension.h" 9 #include "base/allocator/allocator_extension.h"
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 #endif // !CHROME_MULTIPLE_DLL_BROWSER 430 #endif // !CHROME_MULTIPLE_DLL_BROWSER
431 }; 431 };
432 432
433 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) 433 #if !defined(CHROME_MULTIPLE_DLL_BROWSER)
434 UtilityProcessHost::RegisterUtilityMainThreadFactory( 434 UtilityProcessHost::RegisterUtilityMainThreadFactory(
435 CreateInProcessUtilityThread); 435 CreateInProcessUtilityThread);
436 RenderProcessHost::RegisterRendererMainThreadFactory( 436 RenderProcessHost::RegisterRendererMainThreadFactory(
437 CreateInProcessRendererThread); 437 CreateInProcessRendererThread);
438 GpuProcessHost::RegisterGpuMainThreadFactory( 438 GpuProcessHost::RegisterGpuMainThreadFactory(
439 CreateInProcessGpuThread); 439 CreateInProcessGpuThread);
440 #else
441 CommandLine& command_line = *CommandLine::ForCurrentProcess();
442 if (command_line.HasSwitch(switches::kSingleProcess)) {
443 command_line.RemoveSwitch(switches::kSingleProcess);
444 LOG(ERROR) <<
445 "--single-process is not supported in chrome multiple dll browser.";
446 }
447 if (command_line.HasSwitch(switches::kInProcessGPU)) {
448 command_line.RemoveSwitch(switches::kInProcessGPU);
449 LOG(ERROR) <<
450 "--in-process-gpu is not supported in chrome multiple dll browser.";
451 }
dshwang 2013/11/18 16:47:26 I think here is suitable place to warn, because th
440 #endif 452 #endif
441 453
442 for (size_t i = 0; i < arraysize(kMainFunctions); ++i) { 454 for (size_t i = 0; i < arraysize(kMainFunctions); ++i) {
443 if (process_type == kMainFunctions[i].name) { 455 if (process_type == kMainFunctions[i].name) {
444 if (delegate) { 456 if (delegate) {
445 int exit_code = delegate->RunProcess(process_type, 457 int exit_code = delegate->RunProcess(process_type,
446 main_function_params); 458 main_function_params);
447 #if defined(OS_ANDROID) 459 #if defined(OS_ANDROID)
448 // In Android's browser process, the negative exit code doesn't mean the 460 // In Android's browser process, the negative exit code doesn't mean the
449 // default behavior should be used as the UI message loop is managed by 461 // default behavior should be used as the UI message loop is managed by
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 847
836 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 848 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
837 }; 849 };
838 850
839 // static 851 // static
840 ContentMainRunner* ContentMainRunner::Create() { 852 ContentMainRunner* ContentMainRunner::Create() {
841 return new ContentMainRunnerImpl(); 853 return new ContentMainRunnerImpl();
842 } 854 }
843 855
844 } // namespace content 856 } // namespace content
OLDNEW
« no previous file with comments | « base/command_line_unittest.cc ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698