Chromium Code Reviews| Index: chrome/browser/automation/testing_automation_provider_chromeos.cc |
| =================================================================== |
| --- chrome/browser/automation/testing_automation_provider_chromeos.cc (revision 106405) |
| +++ 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); |
| @@ -516,7 +516,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", |
| @@ -524,10 +525,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); |
| } |
| @@ -535,7 +536,8 @@ |
| AutomationJSONReply(this, reply_message).SendSuccess(return_value.get()); |
| } |
| -void TestingAutomationProvider::SetProxySettings(DictionaryValue* args, |
| +void TestingAutomationProvider::SetProxySettings(Browser* browser, |
| + DictionaryValue* args, |
| IPC::Message* reply_message) { |
|
Mattias Nissler (ping if slow)
2011/10/25 12:43:11
indentation
kuan
2011/10/25 16:01:50
Done.
|
| AutomationJSONReply reply(this, reply_message); |
| std::string key; |
| @@ -549,7 +551,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); |
| } |