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

Unified Diff: chrome/browser/policy/test/policy_testserver.py

Issue 1767443002: Add enterprise enrollment support for fake users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 years, 10 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/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.

Powered by Google App Engine
This is Rietveld 408576698