Chromium Code Reviews| Index: chrome/browser/extensions/extension_proxy_api.cc |
| diff --git a/chrome/browser/extensions/extension_proxy_api.cc b/chrome/browser/extensions/extension_proxy_api.cc |
| index cb9d363456d3f2e1a5ef1bcbe0d9d2e41d5e1837..0bbf15232748526a851cc4e25967cfc855c743d0 100644 |
| --- a/chrome/browser/extensions/extension_proxy_api.cc |
| +++ b/chrome/browser/extensions/extension_proxy_api.cc |
| @@ -53,8 +53,8 @@ bool UseCustomProxySettingsFunction::RunImpl() { |
| DictionaryValue* proxy_config; |
| EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &proxy_config)); |
| - bool auto_detect = false; |
| - proxy_config->GetBoolean("autoDetect", &auto_detect); |
| + int proxy_mode = 0; |
| + proxy_config->GetInteger("mode", &proxy_mode); |
|
battre (please use the other)
2010/12/14 09:45:44
I think we should expose this as string constants
danno
2010/12/14 12:48:17
How about a string value externally to the extensi
gfeher
2010/12/16 10:42:04
Done.
|
| DictionaryValue* pac_dict = NULL; |
| proxy_config->GetDictionary("pacScript", &pac_dict); |
| @@ -62,7 +62,7 @@ bool UseCustomProxySettingsFunction::RunImpl() { |
| DictionaryValue* proxy_rules = NULL; |
| proxy_config->GetDictionary("rules", &proxy_rules); |
| - return ApplyAutoDetect(auto_detect) && |
| + return ApplyMode(proxy_mode) && |
| ApplyPacScript(pac_dict) && |
| ApplyProxyRules(proxy_rules); |
| } |
| @@ -75,12 +75,12 @@ bool UseCustomProxySettingsFunction::GetProxyServer( |
| return true; |
| } |
| -bool UseCustomProxySettingsFunction::ApplyAutoDetect(bool auto_detect) { |
| - // We take control of the auto-detect preference even if none was specified, |
| +bool UseCustomProxySettingsFunction::ApplyMode(int mode) { |
| + // We take control of the mode preference even if none was specified, |
| // so that all proxy preferences are controlled by the same extension (if not |
| // by a higher-priority source). |
| - SendNotification(prefs::kProxyAutoDetect, |
| - Value::CreateBooleanValue(auto_detect)); |
| + SendNotification(prefs::kProxyServerMode, |
| + Value::CreateIntegerValue(mode)); |
| return true; |
| } |