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

Side by Side Diff: chrome/browser/automation/testing_automation_provider_chromeos.cc

Issue 8586030: Added ConfigurationPolicyProvider::RefreshPolicies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simpler AsyncLoader, fixed unit_tests, added connector::RefreshPolicies 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698