| 367 | } |
| 368 | |
| 369 | void ProxyManager::SetProxyAuthentication(const std::wstring& user_name, |
| 370 | const std::wstring& password) { |
| 371 | LOG(TRACE) << "ProxyManager::SetProxyAuthentication"; |
| 372 | BOOL success = ::InternetSetOption(NULL, |
| 373 | INTERNET_OPTION_PROXY_USERNAME, |
| 374 | const_cast<wchar_t*>(user_name.c_str()), |
| 375 | static_cast<int>(user_name.size()) + 1); |
| 376 | if (!success) { |
| 377 | LOGERR(WARN) << "InternetSetOption failed setting INTERNET_OPTION_PROXY_USERNAME"; |
| 378 | } |
| 379 | |
| 380 | success = ::InternetSetOption(NULL, |
| 381 | INTERNET_OPTION_PROXY_PASSWORD, |
| 382 | const_cast<wchar_t*>(password.c_str()), |
| 383 | static_cast<int>(password.size()) + 1); |
| 384 | if (!success) { |
| 385 | LOGERR(WARN) << "InternetSetOption failed setting INTERNET_OPTION_PROXY_PASSWORD"; |
| 386 | } |
| 387 | } |
| 388 | |
| 389 | void ProxyManager::GetCurrentProxySettings() { |
| 390 | LOG(TRACE) << "ProxyManager::GetCurrentProxySettings"; |
no test coverage detected