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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 browser_command_line.GetSwitchValueNative(switches::kGpuLauncher); | 348 browser_command_line.GetSwitchValueNative(switches::kGpuLauncher); |
349 | 349 |
350 FilePath exe_path = ChildProcessHost::GetChildPath(gpu_launcher.empty()); | 350 FilePath exe_path = ChildProcessHost::GetChildPath(gpu_launcher.empty()); |
351 if (exe_path.empty()) | 351 if (exe_path.empty()) |
352 return false; | 352 return false; |
353 | 353 |
354 CommandLine* cmd_line = new CommandLine(exe_path); | 354 CommandLine* cmd_line = new CommandLine(exe_path); |
355 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess); | 355 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess); |
356 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); | 356 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); |
357 | 357 |
| 358 SetCrashReporterCommandLine(cmd_line); |
| 359 |
358 // Propagate relevant command line switches. | 360 // Propagate relevant command line switches. |
359 static const char* const kSwitchNames[] = { | 361 static const char* const kSwitchNames[] = { |
360 switches::kUseGL, | 362 switches::kUseGL, |
361 switches::kDisableGpuVsync, | 363 switches::kDisableGpuVsync, |
362 switches::kDisableGpuWatchdog, | 364 switches::kDisableGpuWatchdog, |
363 switches::kDisableLogging, | 365 switches::kDisableLogging, |
364 switches::kEnableAcceleratedDecoding, | 366 switches::kEnableAcceleratedDecoding, |
365 switches::kEnableLogging, | 367 switches::kEnableLogging, |
366 #if defined(OS_MACOSX) | 368 #if defined(OS_MACOSX) |
367 switches::kEnableSandboxLogging, | 369 switches::kEnableSandboxLogging, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 404 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
403 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) || | 405 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) || |
404 blacklist->LoadGpuBlacklist(gpu_blacklist_json.as_string(), true)) { | 406 blacklist->LoadGpuBlacklist(gpu_blacklist_json.as_string(), true)) { |
405 gpu_blacklist_.reset(blacklist); | 407 gpu_blacklist_.reset(blacklist); |
406 return true; | 408 return true; |
407 } | 409 } |
408 delete blacklist; | 410 delete blacklist; |
409 return false; | 411 return false; |
410 } | 412 } |
411 | 413 |
OLD | NEW |