OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/i18n/time_formatting.h" | 8 #include "base/i18n/time_formatting.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 if (!connector) { | 893 if (!connector) { |
894 AutomationJSONReply(this, reply_message).SendError( | 894 AutomationJSONReply(this, reply_message).SendError( |
895 "Unable to access BrowserPolicyConnector"); | 895 "Unable to access BrowserPolicyConnector"); |
896 return; | 896 return; |
897 } | 897 } |
898 policy::CloudPolicySubsystem* policy_subsystem = | 898 policy::CloudPolicySubsystem* policy_subsystem = |
899 connector->user_cloud_policy_subsystem(); | 899 connector->user_cloud_policy_subsystem(); |
900 if (policy_subsystem) { | 900 if (policy_subsystem) { |
901 // Set up an observer (it will delete itself). | 901 // Set up an observer (it will delete itself). |
902 new CloudPolicyObserver(this, reply_message, connector, policy_subsystem); | 902 new CloudPolicyObserver(this, reply_message, connector, policy_subsystem); |
903 connector->FetchDevicePolicy(); | 903 connector->FetchCloudPolicy(); |
904 } else { | 904 } else { |
905 AutomationJSONReply(this, reply_message).SendError( | 905 AutomationJSONReply(this, reply_message).SendError( |
906 "Unable to access CloudPolicySubsystem"); | 906 "Unable to access CloudPolicySubsystem"); |
907 } | 907 } |
908 } | 908 } |
909 | 909 |
910 void TestingAutomationProvider::EnrollEnterpriseDevice( | 910 void TestingAutomationProvider::EnrollEnterpriseDevice( |
911 DictionaryValue* args, IPC::Message* reply_message) { | 911 DictionaryValue* args, IPC::Message* reply_message) { |
912 std::string user, password; | 912 std::string user, password; |
913 if (!args->GetString("user", &user) || | 913 if (!args->GetString("user", &user) || |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 views::Widget* window = browser::CreateViewsWindow( | 1141 views::Widget* window = browser::CreateViewsWindow( |
1142 browser->window()->GetNativeHandle(), take_photo_dialog); | 1142 browser->window()->GetNativeHandle(), take_photo_dialog); |
1143 window->SetAlwaysOnTop(true); | 1143 window->SetAlwaysOnTop(true); |
1144 window->Show(); | 1144 window->Show(); |
1145 } | 1145 } |
1146 | 1146 |
1147 void TestingAutomationProvider::PowerChanged( | 1147 void TestingAutomationProvider::PowerChanged( |
1148 const chromeos::PowerSupplyStatus& status) { | 1148 const chromeos::PowerSupplyStatus& status) { |
1149 power_status = status; | 1149 power_status = status; |
1150 } | 1150 } |
OLD | NEW |