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 "components/policy/core/common/cloud/cloud_policy_client.h" | 5 #include "components/policy/core/common/cloud/cloud_policy_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/guid.h" | 9 #include "base/guid.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
318 *request->add_command_results() = command_result; | 318 *request->add_command_results() = command_result; |
319 | 319 |
320 const DeviceManagementRequestJob::Callback job_callback = | 320 const DeviceManagementRequestJob::Callback job_callback = |
321 base::Bind(&CloudPolicyClient::OnRemoteCommandsFetched, | 321 base::Bind(&CloudPolicyClient::OnRemoteCommandsFetched, |
322 base::Unretained(this), request_job.get(), callback); | 322 base::Unretained(this), request_job.get(), callback); |
323 | 323 |
324 request_jobs_.push_back(request_job.Pass()); | 324 request_jobs_.push_back(request_job.Pass()); |
325 request_jobs_.back()->Start(job_callback); | 325 request_jobs_.back()->Start(job_callback); |
326 } | 326 } |
327 | 327 |
328 void CloudPolicyClient::GetDeviceAttributeUpdatePermission( | |
Mattias Nissler (ping if slow)
2015/04/10 12:22:29
Don't you have a separate code change that adds th
Polina Bondarenko
2015/04/14 14:15:47
Done.
| |
329 const std::string& auth_token, | |
330 const CloudPolicyClient::StatusCallback& callback) { | |
331 // TODO(pbond): Add DeviceAttributeUpdatePermission Request / Response | |
332 callback.Run(true); | |
333 } | |
334 | |
335 void CloudPolicyClient::UpdateDeviceAttributes(const std::string& auth_token, | |
336 const std::string& asset_id, | |
337 const std::string& location, | |
338 const CloudPolicyClient::StatusCallback& callback) { | |
339 // TODO(pbond): Add DeviceAttributeUpdate Request / Response | |
340 callback.Run(true); | |
341 } | |
342 | |
328 void CloudPolicyClient::AddObserver(Observer* observer) { | 343 void CloudPolicyClient::AddObserver(Observer* observer) { |
329 observers_.AddObserver(observer); | 344 observers_.AddObserver(observer); |
330 } | 345 } |
331 | 346 |
332 void CloudPolicyClient::RemoveObserver(Observer* observer) { | 347 void CloudPolicyClient::RemoveObserver(Observer* observer) { |
333 observers_.RemoveObserver(observer); | 348 observers_.RemoveObserver(observer); |
334 } | 349 } |
335 | 350 |
336 void CloudPolicyClient::AddPolicyTypeToFetch( | 351 void CloudPolicyClient::AddPolicyTypeToFetch( |
337 const std::string& policy_type, | 352 const std::string& policy_type, |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
572 | 587 |
573 void CloudPolicyClient::NotifyRobotAuthCodesFetched() { | 588 void CloudPolicyClient::NotifyRobotAuthCodesFetched() { |
574 FOR_EACH_OBSERVER(Observer, observers_, OnRobotAuthCodesFetched(this)); | 589 FOR_EACH_OBSERVER(Observer, observers_, OnRobotAuthCodesFetched(this)); |
575 } | 590 } |
576 | 591 |
577 void CloudPolicyClient::NotifyClientError() { | 592 void CloudPolicyClient::NotifyClientError() { |
578 FOR_EACH_OBSERVER(Observer, observers_, OnClientError(this)); | 593 FOR_EACH_OBSERVER(Observer, observers_, OnClientError(this)); |
579 } | 594 } |
580 | 595 |
581 } // namespace policy | 596 } // namespace policy |
OLD | NEW |