MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / GetCurrentProxyAuthentication

Method GetCurrentProxyAuthentication

cpp/iedriver/ProxyManager.cpp:435–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433}
434
435void ProxyManager::GetCurrentProxyAuthentication() {
436 LOG(TRACE) << "ProxyManager::GetCurrentProxyAuthentication";
437
438 DWORD user_name_length = 0;
439 BOOL success = ::InternetQueryOption(NULL,
440 INTERNET_OPTION_PROXY_USERNAME,
441 NULL,
442 &user_name_length);
443 if (user_name_length > 0) {
444 std::vector<wchar_t> user_name(user_name_length);
445 success = ::InternetQueryOption(NULL,
446 INTERNET_OPTION_PROXY_USERNAME,
447 &user_name[0],
448 &user_name_length);
449 this->current_socks_user_name_ = &user_name[0];
450 }
451
452 DWORD password_length = 0;
453 success = ::InternetQueryOption(NULL,
454 INTERNET_OPTION_PROXY_PASSWORD,
455 NULL,
456 &password_length);
457 if (password_length > 0) {
458 std::vector<wchar_t> password(password_length);
459 success = ::InternetQueryOption(NULL,
460 INTERNET_OPTION_PROXY_PASSWORD,
461 &password[0],
462 &password_length);
463 this->current_socks_password_ = &password[0];
464 }
465}
466
467void ProxyManager::GetCurrentProxyType() {
468 LOG(TRACE) << "ProxyManager::GetCurrentProxyType";

Callers 1

Calls 1

LOGClass · 0.50

Tested by

no test coverage detected