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

Unified Diff: chrome/browser/policy/cloud_policy_controller.h

Issue 9064006: Convert DeviceTokenFetcher and CloudPolicyController response callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nits Created 8 years, 12 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/policy/browser_policy_connector.cc ('k') | chrome/browser/policy/cloud_policy_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/cloud_policy_controller.h
diff --git a/chrome/browser/policy/cloud_policy_controller.h b/chrome/browser/policy/cloud_policy_controller.h
index d3388c01084ceb703a11cfba46e595830cb0f69f..d7c971b734421aece334af6d065beb66a5d3a262 100644
--- a/chrome/browser/policy/cloud_policy_controller.h
+++ b/chrome/browser/policy/cloud_policy_controller.h
@@ -8,23 +8,26 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/policy/cloud_policy_constants.h"
#include "chrome/browser/policy/cloud_policy_data_store.h"
-#include "chrome/browser/policy/device_management_backend.h"
+
+namespace enterprise_management {
+class DeviceManagementResponse;
+}
namespace policy {
class CloudPolicyCacheBase;
class DelayedWorkScheduler;
+class DeviceManagementRequestJob;
class DeviceManagementService;
class DeviceTokenFetcher;
class PolicyNotifier;
// Coordinates the actions of DeviceTokenFetcher, CloudPolicyDataStore,
-// DeviceManagementBackend, and CloudPolicyCache: calls their methods and
-// listens to their callbacks/notifications.
-class CloudPolicyController
- : public DeviceManagementBackend::DevicePolicyResponseDelegate,
- public CloudPolicyDataStore::Observer {
+// and CloudPolicyCache: calls their methods and listens to their
+// callbacks/notifications.
+class CloudPolicyController : public CloudPolicyDataStore::Observer {
public:
// All parameters are weak pointers.
CloudPolicyController(DeviceManagementService* service,
@@ -47,10 +50,10 @@ class CloudPolicyController
// a fetch was attempted.
void RefreshPolicies();
- // DevicePolicyResponseDelegate implementation:
- virtual void HandlePolicyResponse(
- const enterprise_management::DevicePolicyResponse& response) OVERRIDE;
- virtual void OnError(DeviceManagementBackend::ErrorCode code) OVERRIDE;
+ // Policy request response handler.
+ void OnPolicyFetchCompleted(
+ DeviceManagementStatus status,
+ const enterprise_management::DeviceManagementResponse& response);
// CloudPolicyDataStore::Observer implementation:
virtual void OnDeviceTokenChanged() OVERRIDE;
@@ -120,7 +123,7 @@ class CloudPolicyController
CloudPolicyCacheBase* cache_;
CloudPolicyDataStore* data_store_;
DeviceTokenFetcher* token_fetcher_;
- scoped_ptr<DeviceManagementBackend> backend_;
+ scoped_ptr<DeviceManagementRequestJob> request_job_;
ControllerState state_;
PolicyNotifier* notifier_;
« no previous file with comments | « chrome/browser/policy/browser_policy_connector.cc ('k') | chrome/browser/policy/cloud_policy_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698