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

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

Issue 9066005: Remove all old-style DeviceManagementService legacy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase. 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
Index: chrome/browser/policy/device_management_backend.h
diff --git a/chrome/browser/policy/device_management_backend.h b/chrome/browser/policy/device_management_backend.h
deleted file mode 100644
index 58000a1df039c4d4e2891c30ebc00c4751d42141..0000000000000000000000000000000000000000
--- a/chrome/browser/policy/device_management_backend.h
+++ /dev/null
@@ -1,153 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_H_
-#define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_H_
-#pragma once
-
-#include <string>
-
-#include "base/threading/non_thread_safe.h"
-#include "chrome/browser/policy/cloud_policy_data_store.h"
-#include "chrome/browser/policy/proto/device_management_backend.pb.h"
-
-namespace policy {
-
-// Interface for clients that need to converse with the device management
-// server, which provides services to register Chrome installations and CrOS
-// devices for the purpose of fetching centrally-administered policy from the
-// cloud.
-class DeviceManagementBackend : base::NonThreadSafe {
- public:
- enum ErrorCode {
- // Request payload invalid.
- kErrorRequestInvalid,
- // The HTTP request failed.
- kErrorRequestFailed,
- // The server returned an error code that points to a temporary problem.
- kErrorTemporaryUnavailable,
- // The HTTP request returned a non-success code.
- kErrorHttpStatus,
- // Response could not be decoded.
- kErrorResponseDecoding,
- // Service error: Management not supported.
- kErrorServiceManagementNotSupported,
- // Service error: Device not found.
- kErrorServiceDeviceNotFound,
- // Service error: Device token invalid.
- kErrorServiceManagementTokenInvalid,
- // Service error: Activation pending.
- kErrorServiceActivationPending,
- // Service error: The serial number is not valid or not known to the server.
- kErrorServiceInvalidSerialNumber,
- // Service error: The device id used for registration is already taken.
- kErrorServiceDeviceIdConflict,
- // Service error: Policy not found. Error code defined by the DM folks.
- kErrorServicePolicyNotFound = 902,
- };
-
- // These codes are sent in the |error_code| field of the the
- // PolicyFetchResponse protobuf.
- enum PolicyFetchErrorCode {
- kPolicyFetchSuccess = 200,
- kPolicyFetchErrorNotFound = 902
- };
-
- class DeviceRegisterResponseDelegate {
- public:
- virtual ~DeviceRegisterResponseDelegate() {}
- virtual void HandleRegisterResponse(
- const enterprise_management::DeviceRegisterResponse& response) = 0;
- virtual void OnError(ErrorCode code) = 0;
-
- protected:
- DeviceRegisterResponseDelegate() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DeviceRegisterResponseDelegate);
- };
-
- class DeviceUnregisterResponseDelegate {
- public:
- virtual ~DeviceUnregisterResponseDelegate() {}
- virtual void HandleUnregisterResponse(
- const enterprise_management::DeviceUnregisterResponse& response) = 0;
- virtual void OnError(ErrorCode code) = 0;
-
- protected:
- DeviceUnregisterResponseDelegate() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DeviceUnregisterResponseDelegate);
- };
-
- class DevicePolicyResponseDelegate {
- public:
- virtual ~DevicePolicyResponseDelegate() {}
-
- virtual void HandlePolicyResponse(
- const enterprise_management::DevicePolicyResponse& response) = 0;
- virtual void OnError(ErrorCode code) = 0;
-
- protected:
- DevicePolicyResponseDelegate() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DevicePolicyResponseDelegate);
- };
-
- class DeviceAutoEnrollmentResponseDelegate {
- public:
- virtual ~DeviceAutoEnrollmentResponseDelegate() {}
-
- virtual void HandleAutoEnrollmentResponse(
- const enterprise_management::DeviceAutoEnrollmentResponse&
- response) = 0;
- virtual void OnError(ErrorCode code) = 0;
-
- protected:
- DeviceAutoEnrollmentResponseDelegate() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DeviceAutoEnrollmentResponseDelegate);
- };
-
- virtual ~DeviceManagementBackend() {}
-
- virtual void ProcessRegisterRequest(
- const std::string& gaia_auth_token,
- const std::string& oauth_token,
- const std::string& device_id,
- const enterprise_management::DeviceRegisterRequest& request,
- DeviceRegisterResponseDelegate* delegate) = 0;
-
- virtual void ProcessUnregisterRequest(
- const std::string& device_management_token,
- const std::string& device_id,
- const enterprise_management::DeviceUnregisterRequest& request,
- DeviceUnregisterResponseDelegate* delegate) = 0;
-
- virtual void ProcessPolicyRequest(
- const std::string& device_management_token,
- const std::string& device_id,
- CloudPolicyDataStore::UserAffiliation user_affiliation,
- const enterprise_management::DevicePolicyRequest& request,
- const enterprise_management::DeviceStatusReportRequest* device_status,
- DevicePolicyResponseDelegate* delegate) = 0;
-
- virtual void ProcessAutoEnrollmentRequest(
- const std::string& device_id,
- const enterprise_management::DeviceAutoEnrollmentRequest& request,
- DeviceAutoEnrollmentResponseDelegate* delegate) = 0;
-
- protected:
- DeviceManagementBackend() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DeviceManagementBackend);
-};
-
-} // namespace policy
-
-#endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_H_
« no previous file with comments | « chrome/browser/policy/cloud_policy_data_store.cc ('k') | chrome/browser/policy/device_management_backend_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698