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

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

Issue 7867044: PART1: Initiated the SignedSettings refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up some debug output. Created 9 years, 3 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
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 373a20b9c786d6ab129c74536a071ac793669156..2cae4122b7dbf674249e8d025cb7d79720733406 100644
--- a/chrome/browser/automation/testing_automation_provider_chromeos.cc
+++ b/chrome/browser/automation/testing_automation_provider_chromeos.cc
@@ -68,27 +68,12 @@ DictionaryValue* GetNetworkInfoDict(const chromeos::Network* network) {
return item;
}
-Value* GetProxySetting(const std::string& setting_name) {
+const Value* GetProxySetting(const std::string& setting_name) {
chromeos::ProxyCrosSettingsProvider settings_provider;
std::string setting_path = "cros.session.proxy.";
setting_path.append(setting_name);
- if (setting_name == "ignorelist") {
- Value* value;
- if (settings_provider.Get(setting_path, &value))
- return value;
- } else {
- Value* setting;
- if (settings_provider.Get(setting_path, &setting)) {
- DictionaryValue* setting_dict = static_cast<DictionaryValue*>(setting);
- Value* value;
- bool found = setting_dict->Remove("value", &value);
- delete setting;
- if (found)
- return value;
- }
- }
- return NULL;
+ return settings_provider.Get(setting_path);
}
const char* UpdateStatusToString(chromeos::UpdateStatusOperation status) {
@@ -528,9 +513,9 @@ void TestingAutomationProvider::GetProxySettings(DictionaryValue* args,
chromeos::ProxyCrosSettingsProvider settings_provider;
for (size_t i = 0; i < arraysize(settings); ++i) {
- Value* setting = GetProxySetting(settings[i]);
+ const Value* setting = GetProxySetting(settings[i]);
if (setting)
- return_value->Set(settings[i], setting);
+ return_value->Set(settings[i], setting->DeepCopy());
}
AutomationJSONReply(this, reply_message).SendSuccess(return_value.get());
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | chrome/browser/chromeos/cros/network_library.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698