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

Method Initialize

cpp/iedriver/ProxyManager.cpp:72–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72void ProxyManager::Initialize(ProxySettings settings) {
73 LOG(TRACE) << "ProxyManager::Initialize";
74 // The wire protocol specifies lower case for the proxy type, but
75 // language bindings have been sending upper case forever. Handle
76 // both cases, thus we will normalize to a lower-case string for
77 // proxy type.
78 this->proxy_type_ = settings.proxy_type;
79 std::transform(this->proxy_type_.begin(),
80 this->proxy_type_.end(),
81 this->proxy_type_.begin(),
82 ::tolower);
83 this->http_proxy_ = settings.http_proxy;
84 this->ftp_proxy_ = settings.ftp_proxy;
85 this->ssl_proxy_ = settings.ssl_proxy;
86 this->socks_proxy_ = settings.socks_proxy;
87 this->socks_user_name_ = settings.socks_user_name;
88 this->socks_password_ = settings.socks_password;
89 this->proxy_bypass_ = settings.proxy_bypass;
90 this->proxy_autoconfigure_url_ = settings.proxy_autoconfig_url;
91 if (this->proxy_type_ == WD_PROXY_TYPE_SYSTEM ||
92 this->proxy_type_ == WD_PROXY_TYPE_DIRECT ||
93 this->proxy_type_ == WD_PROXY_TYPE_MANUAL) {
94 this->use_per_process_proxy_ = settings.use_per_process_proxy;
95 } else {
96 // By definition, per-process proxy settings can only be used with the
97 // system proxy, direct connection, or with a manually specified proxy.
98 this->use_per_process_proxy_ = false;
99 }
100}
101
102void ProxyManager::SetProxySettings(HWND browser_window_handle) {
103 LOG(TRACE) << "ProxyManager::SetProxySettings";

Callers 1

Calls 2

endMethod · 0.80
LOGClass · 0.50

Tested by

no test coverage detected