| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/automation/testing_automation_provider.h" | 5 #include "chrome/browser/automation/testing_automation_provider.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
| 9 #include "ash/system/tray/system_tray_delegate.h" | 9 #include "ash/system/tray/system_tray_delegate.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "chrome/browser/chromeos/login/screens/update_screen.h" | 32 #include "chrome/browser/chromeos/login/screens/update_screen.h" |
| 33 #include "chrome/browser/chromeos/login/screens/user_image_screen.h" | 33 #include "chrome/browser/chromeos/login/screens/user_image_screen.h" |
| 34 #include "chrome/browser/chromeos/login/startup_utils.h" | 34 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 35 #include "chrome/browser/chromeos/login/webui_login_display.h" | 35 #include "chrome/browser/chromeos/login/webui_login_display.h" |
| 36 #include "chrome/browser/chromeos/login/wizard_controller.h" | 36 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 37 #include "chrome/browser/chromeos/proxy_config_service_impl.h" | 37 #include "chrome/browser/chromeos/proxy_config_service_impl.h" |
| 38 #include "chrome/browser/chromeos/proxy_cros_settings_parser.h" | 38 #include "chrome/browser/chromeos/proxy_cros_settings_parser.h" |
| 39 #include "chrome/browser/chromeos/settings/cros_settings.h" | 39 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 40 #include "chrome/browser/chromeos/settings/cros_settings_names.h" | 40 #include "chrome/browser/chromeos/settings/cros_settings_names.h" |
| 41 #include "chrome/browser/chromeos/system/timezone_settings.h" | 41 #include "chrome/browser/chromeos/system/timezone_settings.h" |
| 42 #include "chrome/browser/chromeos/ui_proxy_config_service.h" |
| 42 #include "chrome/browser/ui/browser.h" | 43 #include "chrome/browser/ui/browser.h" |
| 43 #include "chrome/browser/ui/browser_window.h" | 44 #include "chrome/browser/ui/browser_window.h" |
| 44 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 45 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 45 #include "chrome/common/pref_names.h" | 46 #include "chrome/common/pref_names.h" |
| 46 #include "chromeos/dbus/dbus_thread_manager.h" | 47 #include "chromeos/dbus/dbus_thread_manager.h" |
| 47 #include "chromeos/dbus/power_manager_client.h" | 48 #include "chromeos/dbus/power_manager_client.h" |
| 48 #include "chromeos/dbus/session_manager_client.h" | 49 #include "chromeos/dbus/session_manager_client.h" |
| 49 #include "chromeos/dbus/update_engine_client.h" | 50 #include "chromeos/dbus/update_engine_client.h" |
| 50 #include "content/public/browser/web_contents.h" | 51 #include "content/public/browser/web_contents.h" |
| 51 #include "net/base/network_change_notifier.h" | 52 #include "net/base/network_change_notifier.h" |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 if (!profile) { | 747 if (!profile) { |
| 747 reply.SendError(error_message); | 748 reply.SendError(error_message); |
| 748 return; | 749 return; |
| 749 } | 750 } |
| 750 chromeos::ProxyConfigServiceImpl* config_service = | 751 chromeos::ProxyConfigServiceImpl* config_service = |
| 751 profile->GetProxyConfigTracker(); | 752 profile->GetProxyConfigTracker(); |
| 752 if (!config_service) { | 753 if (!config_service) { |
| 753 reply.SendError("Unable to get proxy configuration."); | 754 reply.SendError("Unable to get proxy configuration."); |
| 754 return; | 755 return; |
| 755 } | 756 } |
| 756 config_service->UISetCurrentNetwork(service_path); | 757 config_service->GetUIService().SetCurrentNetwork(service_path); |
| 757 reply.SendSuccess(NULL); | 758 reply.SendSuccess(NULL); |
| 758 } | 759 } |
| 759 | 760 |
| 760 void TestingAutomationProvider::SetProxySettings(DictionaryValue* args, | 761 void TestingAutomationProvider::SetProxySettings(DictionaryValue* args, |
| 761 IPC::Message* reply_message) { | 762 IPC::Message* reply_message) { |
| 762 AutomationJSONReply reply(this, reply_message); | 763 AutomationJSONReply reply(this, reply_message); |
| 763 std::string key; | 764 std::string key; |
| 764 base::Value* value; | 765 base::Value* value; |
| 765 if (!args->GetString("key", &key) || !args->Get("value", &value)) { | 766 if (!args->GetString("key", &key) || !args->Get("value", &value)) { |
| 766 reply.SendError("Invalid or missing args."); | 767 reply.SendError("Invalid or missing args."); |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1340 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> | 1341 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> |
| 1341 AddObserver(power_manager_observer_); | 1342 AddObserver(power_manager_observer_); |
| 1342 } | 1343 } |
| 1343 | 1344 |
| 1344 void TestingAutomationProvider::RemoveChromeosObservers() { | 1345 void TestingAutomationProvider::RemoveChromeosObservers() { |
| 1345 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> | 1346 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> |
| 1346 RemoveObserver(power_manager_observer_); | 1347 RemoveObserver(power_manager_observer_); |
| 1347 delete power_manager_observer_; | 1348 delete power_manager_observer_; |
| 1348 power_manager_observer_ = NULL; | 1349 power_manager_observer_ = NULL; |
| 1349 } | 1350 } |
| OLD | NEW |