Skip to content

Commit 59bb774

Browse files
committed
added using system proxy by default
1 parent b3d5ac0 commit 59bb774

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/webdriver/extension_qt/q_session_lifecycle_actions.cc

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,25 @@ Error* QSessionLifeCycleActions::PostInit(const base::DictionaryValue* desired_c
2121
Error* error = NULL;
2222
session_->logger().Log(kInfoLogLevel, "Custom QT PostInit action.");
2323

24-
const DictionaryValue* proxy_settings = NULL;
24+
const DictionaryValue* proxy_settings = NULL;
2525
if (required_capabilities_dict)
2626
required_capabilities_dict->GetDictionary(Capabilities::kProxy, &proxy_settings);
2727

2828
if (!proxy_settings && desired_capabilities_dict)
2929
desired_capabilities_dict->GetDictionary(Capabilities::kProxy, &proxy_settings);
3030

3131
if (proxy_settings) {
32-
session_->logger().Log(kInfoLogLevel, "proxy settings requsted, aplying...");
33-
error = ParseAndApplyProxySettings(proxy_settings);
34-
if (error)
35-
return error;
32+
session_->logger().Log(kInfoLogLevel, "proxy settings requsted, aplying...");
33+
error = ParseAndApplyProxySettings(proxy_settings);
3634
} else {
3735
session_->logger().Log(kInfoLogLevel, "no proxy settings requsted.");
38-
}
36+
session_->logger().Log(kInfoLogLevel, "Applying system proxy by default.");
37+
DictionaryValue* proxy_system = new DictionaryValue();
38+
proxy_system->SetString("proxyType", "SYSTEM");
39+
error = ParseAndApplyProxySettings(proxy_system);
40+
}
41+
if (error)
42+
return error;
3943

4044
AddActualQtVersion();
4145
if (required_capabilities_dict)

0 commit comments

Comments
 (0)