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

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: Addressed comments from Chris and rebased to ToT to get it running on the try servers again. Created 9 years, 2 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/chrome_browser_main.cc » ('j') | chrome/browser/chromeos/cros_settings.h » ('J')
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 38ccb97fc374fef280439e37c4dda19cfe160d07..764bf3c3c1a92a5193f1148010aa4f95738986a0 100644
--- a/chrome/browser/automation/testing_automation_provider_chromeos.cc
+++ b/chrome/browser/automation/testing_automation_provider_chromeos.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/automation/automation_provider_observers.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/audio_handler.h"
+#include "chrome/browser/chromeos/cros_settings.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/browser/chromeos/cros/network_library.h"
#include "chrome/browser/chromeos/cros/power_library.h"
@@ -26,7 +27,6 @@
#include "chrome/browser/chromeos/login/webui_login_display.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/chromeos/options/take_photo_dialog.h"
-#include "chrome/browser/chromeos/proxy_cros_settings_provider.h"
#include "chrome/browser/chromeos/system/timezone_settings.h"
#include "chrome/browser/policy/browser_policy_connector.h"
#include "chrome/browser/policy/cloud_policy_cache_base.h"
@@ -68,27 +68,11 @@ DictionaryValue* GetNetworkInfoDict(const chromeos::Network* network) {
return item;
}
-Value* GetProxySetting(const std::string& setting_name) {
- chromeos::ProxyCrosSettingsProvider settings_provider;
+const Value* GetProxySetting(const std::string& setting_name) {
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 chromeos::CrosSettings::Get()->GetPref(setting_path);
}
const char* UpdateStatusToString(chromeos::UpdateStatusOperation status) {
@@ -524,12 +508,11 @@ void TestingAutomationProvider::GetProxySettings(DictionaryValue* args,
"socks", "socksport", "ignorelist" };
scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
- 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());
@@ -549,7 +532,7 @@ void TestingAutomationProvider::SetProxySettings(DictionaryValue* args,
setting_path.append(key);
// ProxyCrosSettingsProvider will own the Value* passed to Set().
- chromeos::ProxyCrosSettingsProvider().Set(setting_path, value->DeepCopy());
+ chromeos::CrosSettings::Get()->Set(setting_path, value->DeepCopy());
reply.SendSuccess(NULL);
}
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | chrome/browser/chromeos/cros_settings.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698