Chromium Code Reviews| Index: chrome/browser/policy/test/policy_testserver.py |
| diff --git a/chrome/browser/policy/test/policy_testserver.py b/chrome/browser/policy/test/policy_testserver.py |
| index c7f933dd082ab81562dce20ec1e5048011174601..13027fd4ec0e69636e212fa224c09ac2970ad4a8 100644 |
| --- a/chrome/browser/policy/test/policy_testserver.py |
| +++ b/chrome/browser/policy/test/policy_testserver.py |
| @@ -308,6 +308,10 @@ class PolicyRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): |
| elif request_type == 'status_upload': |
| response = self.ProcessStatusUploadRequest( |
| rmsg.device_status_report_request, rmsg.session_status_report_request) |
| + elif request_type == 'device_attribute_update_permission': |
| + response = self.ProcessDeviceAttributeUpdatePermissionRequest() |
| + elif request_type == 'remote_commands': |
| + response = self.ProcessRemoteCommandsRequest() |
| else: |
| return (400, 'Invalid request parameter') |
| @@ -586,6 +590,26 @@ class PolicyRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): |
| return (200, response) |
| + def ProcessDeviceAttributeUpdatePermissionRequest(self): |
| + """Handles a device attribute update permission request. |
| + |
| + Returns: |
| + A tuple of HTTP status code and response data to send to the client. |
| + """ |
| + response = dm.DeviceManagementResponse() |
| + response.device_attribute_update_permission_response.result =\ |
|
achuithb
2016/03/03 22:45:00
Can we use parens instead of \ for line break?
jdufault
2016/03/04 20:42:47
Done.
|
| + dm.DeviceAttributeUpdatePermissionResponse.ATTRIBUTE_UPDATE_ALLOWED |
| + |
| + return (200, response) |
| + |
| + def ProcessRemoteCommandsRequest(self): |
| + """Handles a remote command request. |
| + |
| + Returns: |
| + A tuple of HTTP status code and response data to send to the client. |
| + """ |
| + return (200, '') |
| + |
| def SetProtobufMessageField(self, group_message, field, field_value): |
| """Sets a field in a protobuf message. |