Introduce chrome proxy implementation based on command-line flags (issue #600).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1080 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-02-06 20:41:54 +00:00
parent bccce6258f
commit 81d27df883
36 changed files with 165 additions and 672 deletions

View File

@ -76,32 +76,6 @@ void AppGetSettings(CefSettings& settings, CefRefPtr<ClientApp> app) {
CefString(&settings.cache_path) =
g_command_line->GetSwitchValue(cefclient::kCachePath);
// Retrieve command-line proxy configuration, if any.
bool has_proxy = false;
cef_proxy_type_t proxy_type = CEF_PROXY_TYPE_DIRECT;
CefString proxy_config;
if (g_command_line->HasSwitch(cefclient::kProxyType)) {
std::string str = g_command_line->GetSwitchValue(cefclient::kProxyType);
if (str == cefclient::kProxyType_Direct) {
has_proxy = true;
proxy_type = CEF_PROXY_TYPE_DIRECT;
} else if (str == cefclient::kProxyType_Named ||
str == cefclient::kProxyType_Pac) {
proxy_config = g_command_line->GetSwitchValue(cefclient::kProxyConfig);
if (!proxy_config.empty()) {
has_proxy = true;
proxy_type = (str == cefclient::kProxyType_Named?
CEF_PROXY_TYPE_NAMED:CEF_PROXY_TYPE_PAC_STRING);
}
}
}
if (has_proxy) {
// Provide a ClientApp instance to handle proxy resolution.
app->SetProxyConfig(proxy_type, proxy_config);
}
}
bool AppIsOffScreenRenderingEnabled() {