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 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 if (!connector) { | 947 if (!connector) { |
948 AutomationJSONReply(this, reply_message).SendError( | 948 AutomationJSONReply(this, reply_message).SendError( |
949 "Unable to access BrowserPolicyConnector"); | 949 "Unable to access BrowserPolicyConnector"); |
950 return; | 950 return; |
951 } | 951 } |
952 policy::CloudPolicySubsystem* policy_subsystem = | 952 policy::CloudPolicySubsystem* policy_subsystem = |
953 connector->user_cloud_policy_subsystem(); | 953 connector->user_cloud_policy_subsystem(); |
954 if (policy_subsystem) { | 954 if (policy_subsystem) { |
955 // Set up an observer (it will delete itself). | 955 // Set up an observer (it will delete itself). |
956 new CloudPolicyObserver(this, reply_message, connector, policy_subsystem); | 956 new CloudPolicyObserver(this, reply_message, connector, policy_subsystem); |
957 connector->FetchDevicePolicy(); | 957 connector->FetchCloudPolicy(); |
958 } else { | 958 } else { |
959 AutomationJSONReply(this, reply_message).SendError( | 959 AutomationJSONReply(this, reply_message).SendError( |
960 "Unable to access CloudPolicySubsystem"); | 960 "Unable to access CloudPolicySubsystem"); |
961 } | 961 } |
962 } | 962 } |
963 | 963 |
964 void TestingAutomationProvider::EnrollEnterpriseDevice( | 964 void TestingAutomationProvider::EnrollEnterpriseDevice( |
965 DictionaryValue* args, IPC::Message* reply_message) { | 965 DictionaryValue* args, IPC::Message* reply_message) { |
966 std::string user, password; | 966 std::string user, password; |
967 if (!args->GetString("user", &user) || | 967 if (!args->GetString("user", &user) || |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1204 views::Widget* window = browser::CreateViewsWindow( | 1204 views::Widget* window = browser::CreateViewsWindow( |
1205 browser->window()->GetNativeHandle(), take_photo_dialog); | 1205 browser->window()->GetNativeHandle(), take_photo_dialog); |
1206 window->SetAlwaysOnTop(true); | 1206 window->SetAlwaysOnTop(true); |
1207 window->Show(); | 1207 window->Show(); |
1208 } | 1208 } |
1209 | 1209 |
1210 void TestingAutomationProvider::PowerChanged( | 1210 void TestingAutomationProvider::PowerChanged( |
1211 const chromeos::PowerSupplyStatus& status) { | 1211 const chromeos::PowerSupplyStatus& status) { |
1212 power_status = status; | 1212 power_status = status; |
1213 } | 1213 } |
OLD | NEW |