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

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

Issue 8102019: redesign and reimplement proxy config service and tracker, revise proxy ui on cros (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
===================================================================
--- chrome/browser/automation/testing_automation_provider_chromeos.cc (revision 108608)
+++ chrome/browser/automation/testing_automation_provider_chromeos.cc (working copy)
@@ -68,8 +68,8 @@
return item;
}
-Value* GetProxySetting(const std::string& setting_name) {
- chromeos::ProxyCrosSettingsProvider settings_provider;
+Value* GetProxySetting(Browser* browser, const std::string& setting_name) {
+ chromeos::ProxyCrosSettingsProvider settings_provider(browser->profile());
std::string setting_path = "cros.session.proxy.";
setting_path.append(setting_name);
@@ -518,7 +518,8 @@
}
}
-void TestingAutomationProvider::GetProxySettings(DictionaryValue* args,
+void TestingAutomationProvider::GetProxySettings(Browser* browser,
+ DictionaryValue* args,
IPC::Message* reply_message) {
const char* settings[] = { "pacurl", "singlehttp", "singlehttpport",
"httpurl", "httpport", "httpsurl", "httpsport",
@@ -526,10 +527,10 @@
"socks", "socksport", "ignorelist" };
scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
- chromeos::ProxyCrosSettingsProvider settings_provider;
+ chromeos::ProxyCrosSettingsProvider settings_provider(browser->profile());
for (size_t i = 0; i < arraysize(settings); ++i) {
- Value* setting = GetProxySetting(settings[i]);
+ Value* setting = GetProxySetting(browser, settings[i]);
if (setting)
return_value->Set(settings[i], setting);
}
@@ -537,8 +538,9 @@
AutomationJSONReply(this, reply_message).SendSuccess(return_value.get());
}
-void TestingAutomationProvider::SetProxySettings(DictionaryValue* args,
- IPC::Message* reply_message) {
+void TestingAutomationProvider::SetProxySettings(Browser* browser,
+ DictionaryValue* args,
+ IPC::Message* reply_message) {
AutomationJSONReply reply(this, reply_message);
std::string key;
Value* value;
@@ -551,7 +553,8 @@
setting_path.append(key);
// ProxyCrosSettingsProvider will own the Value* passed to Set().
- chromeos::ProxyCrosSettingsProvider().Set(setting_path, value->DeepCopy());
+ chromeos::ProxyCrosSettingsProvider(browser->profile()).Set(setting_path,
+ value->DeepCopy());
reply.SendSuccess(NULL);
}

Powered by Google App Engine
This is Rietveld 408576698