| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/test/chromedriver/chrome_launcher.h" | 5 #include "chrome/test/chromedriver/chrome_launcher.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 if (!capabilities.minidump_path.empty()) { | 232 if (!capabilities.minidump_path.empty()) { |
| 233 VLOG(0) << "Minidump generation specified. Will save dumps to: " | 233 VLOG(0) << "Minidump generation specified. Will save dumps to: " |
| 234 << capabilities.minidump_path; | 234 << capabilities.minidump_path; |
| 235 | 235 |
| 236 options.environ["CHROME_HEADLESS"] = 1; | 236 options.environ["CHROME_HEADLESS"] = 1; |
| 237 options.environ["BREAKPAD_DUMP_LOCATION"] = capabilities.minidump_path; | 237 options.environ["BREAKPAD_DUMP_LOCATION"] = capabilities.minidump_path; |
| 238 | 238 |
| 239 if (!command.HasSwitch(kEnableCrashReport)) | 239 if (!command.HasSwitch(kEnableCrashReport)) |
| 240 command.AppendSwitch(kEnableCrashReport); | 240 command.AppendSwitch(kEnableCrashReport); |
| 241 } | 241 } |
| 242 |
| 243 // We need to allow new privileges so that chrome's setuid sandbox can run. |
| 244 options.allow_new_privs = true; |
| 242 #endif | 245 #endif |
| 243 | 246 |
| 244 #if !defined(OS_WIN) | 247 #if !defined(OS_WIN) |
| 245 if (!capabilities.log_path.empty()) | 248 if (!capabilities.log_path.empty()) |
| 246 options.environ["CHROME_LOG_FILE"] = capabilities.log_path; | 249 options.environ["CHROME_LOG_FILE"] = capabilities.log_path; |
| 247 if (capabilities.detach) | 250 if (capabilities.detach) |
| 248 options.new_process_group = true; | 251 options.new_process_group = true; |
| 249 #endif | 252 #endif |
| 250 | 253 |
| 251 #if defined(OS_POSIX) | 254 #if defined(OS_POSIX) |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 // Write empty "First Run" file, otherwise Chrome will wipe the default | 685 // Write empty "First Run" file, otherwise Chrome will wipe the default |
| 683 // profile that was written. | 686 // profile that was written. |
| 684 if (base::WriteFile( | 687 if (base::WriteFile( |
| 685 user_data_dir.Append(chrome::kFirstRunSentinel), "", 0) != 0) { | 688 user_data_dir.Append(chrome::kFirstRunSentinel), "", 0) != 0) { |
| 686 return Status(kUnknownError, "failed to write first run file"); | 689 return Status(kUnknownError, "failed to write first run file"); |
| 687 } | 690 } |
| 688 return Status(kOk); | 691 return Status(kOk); |
| 689 } | 692 } |
| 690 | 693 |
| 691 } // namespace internal | 694 } // namespace internal |
| OLD | NEW |