| 350 | } |
| 351 | |
| 352 | bool BrowserFactory::CreateUniqueTempDir(std::wstring &temp_dir) { |
| 353 | // get temporary folder for the current user |
| 354 | wchar_t temp_path_array[128]; |
| 355 | ::GetTempPath(128, temp_path_array); |
| 356 | std::wstring temp_path = temp_path_array; |
| 357 | if (!DirectoryExists(temp_path)) { |
| 358 | return false; |
| 359 | } |
| 360 | |
| 361 | // create a IEDriver temporary folder inside the user level temporary folder |
| 362 | bool temp_dir_created = false; |
| 363 | for (int i = 0; i < 10; i++) { |
| 364 | std::wstring output = |
| 365 | temp_path + L"IEDriver-" + StringUtilities::CreateGuid(); |
| 366 | if (DirectoryExists(output)) { |
| 367 | continue; |
| 368 | } |
| 369 | |
| 370 | ::CreateDirectory(output.c_str(), NULL); |
| 371 | if (!DirectoryExists(output)) { |
| 372 | continue; |
| 373 | } |
| 374 | |
| 375 | temp_dir = output; |
| 376 | temp_dir_created = true; |
| 377 | break; |
| 378 | } |
| 379 | |
| 380 | return temp_dir_created; |
| 381 | } |
| 382 | |
| 383 | void BrowserFactory::LaunchEdgeInIEMode(PROCESS_INFORMATION* proc_info, |
| 384 | std::string* error_message) { |
nothing calls this directly
no outgoing calls
no test coverage detected