Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Unified Diff: chrome/browser/automation/testing_automation_provider_chromeos.cc

Issue 10834109: Consistently decorate pref values sent to the settings UI code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Silly me, made a CrOS-only change and tested it on a desktop build... Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/proxy_cros_settings_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9418f9c68b4004c7eaaf88110adac971a4f747e0 100644
--- a/chrome/browser/automation/testing_automation_provider_chromeos.cc
+++ b/chrome/browser/automation/testing_automation_provider_chromeos.cc
@@ -87,24 +87,16 @@ 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)) {
+ scoped_ptr<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;
- }
+ if (setting_dict->Remove("value", &value))
+ return value;
}
+
return NULL;
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/proxy_cros_settings_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698