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

Side by Side Diff: chrome/browser/gpu_process_host.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
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 "chrome/browser/gpu_process_host.h" 5 #include "chrome/browser/gpu_process_host.h"
6 6
7 #include "app/app_switches.h" 7 #include "app/app_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/thread.h" 10 #include "base/thread.h"
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); 487 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id());
488 488
489 // Propagate relevant command line switches. 489 // Propagate relevant command line switches.
490 static const char* const kSwitchNames[] = { 490 static const char* const kSwitchNames[] = {
491 switches::kUseGL, 491 switches::kUseGL,
492 switches::kDisableGpuVsync, 492 switches::kDisableGpuVsync,
493 switches::kDisableGpuWatchdog, 493 switches::kDisableGpuWatchdog,
494 switches::kDisableLogging, 494 switches::kDisableLogging,
495 switches::kEnableAcceleratedDecoding, 495 switches::kEnableAcceleratedDecoding,
496 switches::kEnableLogging, 496 switches::kEnableLogging,
497 #if defined(OS_MACOSX)
498 switches::kEnableSandboxLogging,
499 #endif
497 switches::kGpuStartupDialog, 500 switches::kGpuStartupDialog,
498 switches::kLoggingLevel, 501 switches::kLoggingLevel,
502 switches::kNoGpuSandbox,
503 switches::kNoSandbox,
499 }; 504 };
500 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, 505 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames,
501 arraysize(kSwitchNames)); 506 arraysize(kSwitchNames));
502 507
503 // If specified, prepend a launcher program to the command line. 508 // If specified, prepend a launcher program to the command line.
504 if (!gpu_launcher.empty()) 509 if (!gpu_launcher.empty())
505 cmd_line->PrependWrapper(gpu_launcher); 510 cmd_line->PrependWrapper(gpu_launcher);
506 511
507 Launch( 512 Launch(
508 #if defined(OS_WIN) 513 #if defined(OS_WIN)
509 FilePath(), 514 FilePath(),
510 #elif defined(OS_POSIX) 515 #elif defined(OS_POSIX)
511 false, // Never use the zygote (GPU plugin can't be sandboxed). 516 false, // Never use the zygote (GPU plugin can't be sandboxed).
512 base::environment_vector(), 517 base::environment_vector(),
513 #endif 518 #endif
514 cmd_line); 519 cmd_line);
515 520
516 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents", 521 UMA_HISTOGRAM_ENUMERATION("GPU.GPUProcessLifetimeEvents",
517 kLaunched, kGPUProcessLifetimeEvent_Max); 522 kLaunched, kGPUProcessLifetimeEvent_Max);
518 return true; 523 return true;
519 } 524 }
520 525
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698