OLD | NEW |
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/string_piece.h" | 10 #include "base/string_piece.h" |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 browser_command_line.GetSwitchValueNative(switches::kGpuLauncher); | 468 browser_command_line.GetSwitchValueNative(switches::kGpuLauncher); |
469 | 469 |
470 FilePath exe_path = ChildProcessHost::GetChildPath(gpu_launcher.empty()); | 470 FilePath exe_path = ChildProcessHost::GetChildPath(gpu_launcher.empty()); |
471 if (exe_path.empty()) | 471 if (exe_path.empty()) |
472 return false; | 472 return false; |
473 | 473 |
474 CommandLine* cmd_line = new CommandLine(exe_path); | 474 CommandLine* cmd_line = new CommandLine(exe_path); |
475 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess); | 475 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess); |
476 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); | 476 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); |
477 | 477 |
| 478 SetCrashReporterCommandLine(cmd_line); |
| 479 |
478 // Propagate relevant command line switches. | 480 // Propagate relevant command line switches. |
479 static const char* const kSwitchNames[] = { | 481 static const char* const kSwitchNames[] = { |
480 switches::kUseGL, | 482 switches::kUseGL, |
481 switches::kDisableGpuVsync, | 483 switches::kDisableGpuVsync, |
482 switches::kDisableGpuWatchdog, | 484 switches::kDisableGpuWatchdog, |
483 switches::kDisableLogging, | 485 switches::kDisableLogging, |
484 switches::kEnableAcceleratedDecoding, | 486 switches::kEnableAcceleratedDecoding, |
485 switches::kEnableLogging, | 487 switches::kEnableLogging, |
486 #if defined(OS_MACOSX) | 488 #if defined(OS_MACOSX) |
487 switches::kEnableSandboxLogging, | 489 switches::kEnableSandboxLogging, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 524 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
523 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) || | 525 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) || |
524 blacklist->LoadGpuBlacklist(gpu_blacklist_json.as_string(), true)) { | 526 blacklist->LoadGpuBlacklist(gpu_blacklist_json.as_string(), true)) { |
525 gpu_blacklist_.reset(blacklist); | 527 gpu_blacklist_.reset(blacklist); |
526 return true; | 528 return true; |
527 } | 529 } |
528 delete blacklist; | 530 delete blacklist; |
529 return false; | 531 return false; |
530 } | 532 } |
531 | 533 |
OLD | NEW |