Index: chrome/browser/automation/testing_automation_provider_chromeos.cc |
diff --git a/chrome/browser/automation/testing_automation_provider_chromeos.cc b/chrome/browser/automation/testing_automation_provider_chromeos.cc |
index 926170b0fb663d37413baef4c8eccac150070d34..647a35ab6519a309021bc4bf07d093e695a8ff6e 100644 |
--- a/chrome/browser/automation/testing_automation_provider_chromeos.cc |
+++ b/chrome/browser/automation/testing_automation_provider_chromeos.cc |
@@ -87,24 +87,17 @@ base::Value* GetProxySetting(Browser* browser, |
std::string setting_path = "cros.session.proxy."; |
setting_path.append(setting_name); |
- if (setting_name == "ignorelist") { |
+ base::Value* setting; |
+ if (chromeos::proxy_cros_settings_parser::GetProxyPrefValue( |
+ browser->profile(), setting_path, &setting)) { |
+ DictionaryValue* setting_dict = static_cast<DictionaryValue*>(setting); |
base::Value* value; |
- if (chromeos::proxy_cros_settings_parser::GetProxyPrefValue( |
- browser->profile(), setting_path, &value)) { |
- return value; |
- } |
- } else { |
- base::Value* setting; |
- if (chromeos::proxy_cros_settings_parser::GetProxyPrefValue( |
- browser->profile(), setting_path, &setting)) { |
- DictionaryValue* setting_dict = static_cast<DictionaryValue*>(setting); |
- base::Value* value; |
- bool found = setting_dict->Remove("value", &value); |
- delete setting; |
- if (found) |
- return value; |
- } |
+ bool found = setting_dict->Remove("value", &value); |
+ delete setting; |
James Hawkins
2012/08/07 17:59:05
nit: Wrap the returned value in a scoped_ptr inste
bartfab (slow)
2012/08/07 18:27:05
Done.
|
+ if (found) |
+ return value; |
} |
+ |
return NULL; |
} |