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

Side by Side Diff: chrome/browser/policy/device_management_backend_impl.h

Issue 6537020: Update policy backend and testserver for the newest policy protocol (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 5 Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
Jakob Kummerow 2011/02/21 16:15:00 nit: 2011
gfeher 2011/02/22 15:57:29 Done.
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 #ifndef CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_IMPL_H_ 5 #ifndef CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_IMPL_H_
6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_IMPL_H_ 6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 11
(...skipping 17 matching lines...) Expand all
29 // Name constants for URL query parameters. 29 // Name constants for URL query parameters.
30 static const char kParamRequest[]; 30 static const char kParamRequest[];
31 static const char kParamDeviceType[]; 31 static const char kParamDeviceType[];
32 static const char kParamAppType[]; 32 static const char kParamAppType[];
33 static const char kParamDeviceID[]; 33 static const char kParamDeviceID[];
34 static const char kParamAgent[]; 34 static const char kParamAgent[];
35 35
36 // String constants for the device and app type we report to the server. 36 // String constants for the device and app type we report to the server.
37 static const char kValueRequestRegister[]; 37 static const char kValueRequestRegister[];
38 static const char kValueRequestUnregister[]; 38 static const char kValueRequestUnregister[];
39 // Deprecated in favor of kValueRequestCloudPolicy.
40 // See DevicePolicyResponseDelegate::HandlePolicyResponse.
41 static const char kValueRequestPolicy[]; 39 static const char kValueRequestPolicy[];
42 static const char kValueRequestCloudPolicy[]; 40 static const char kValueDeviceType[];
43 static const char kValueDeviceType[];
44 static const char kValueAppType[]; 41 static const char kValueAppType[];
42 static const char kValueMachineModel[];
45 43
46 private: 44 private:
47 friend class DeviceManagementJobBase; 45 friend class DeviceManagementJobBase;
48 46
49 typedef std::set<DeviceManagementJobBase*> JobSet; 47 typedef std::set<DeviceManagementJobBase*> JobSet;
50 48
51 // Called by the DeviceManagementJobBase dtor so we can clean up. 49 // Called by the DeviceManagementJobBase dtor so we can clean up.
52 void JobDone(DeviceManagementJobBase* job); 50 void JobDone(DeviceManagementJobBase* job);
53 51
54 // Add a job to the pending job set and register it with the service (if 52 // Add a job to the pending job set and register it with the service (if
55 // available). 53 // available).
56 void AddJob(DeviceManagementJobBase* job); 54 void AddJob(DeviceManagementJobBase* job);
57 55
58 // DeviceManagementBackend overrides. 56 // DeviceManagementBackend overrides.
59 virtual void ProcessRegisterRequest( 57 virtual void ProcessRegisterRequest(
60 const std::string& auth_token, 58 const std::string& auth_token,
61 const std::string& device_id, 59 const std::string& device_id,
62 const em::DeviceRegisterRequest& request, 60 const em::DeviceRegisterRequest& request,
63 DeviceRegisterResponseDelegate* response_delegate); 61 DeviceRegisterResponseDelegate* response_delegate);
64 virtual void ProcessUnregisterRequest( 62 virtual void ProcessUnregisterRequest(
65 const std::string& device_management_token, 63 const std::string& device_management_token,
66 const std::string& device_id, 64 const std::string& device_id,
67 const em::DeviceUnregisterRequest& request, 65 const em::DeviceUnregisterRequest& request,
68 DeviceUnregisterResponseDelegate* response_delegate); 66 DeviceUnregisterResponseDelegate* response_delegate);
69 // Deprecated in favor of ProcessCloudPolicyRequest.
70 // See DevicePolicyResponseDelegate::HandlePolicyResponse.
71 virtual void ProcessPolicyRequest( 67 virtual void ProcessPolicyRequest(
72 const std::string& device_management_token, 68 const std::string& device_management_token,
73 const std::string& device_id, 69 const std::string& device_id,
74 const em::DevicePolicyRequest& request, 70 const em::DevicePolicyRequest& request,
75 DevicePolicyResponseDelegate* response_delegate); 71 DevicePolicyResponseDelegate* response_delegate);
76 virtual void ProcessCloudPolicyRequest(
77 const std::string& device_management_token,
78 const std::string& device_id,
79 const em::CloudPolicyRequest& request,
80 DevicePolicyResponseDelegate* delegate);
81 72
82 // Keeps track of the jobs currently in flight. 73 // Keeps track of the jobs currently in flight.
83 JobSet pending_jobs_; 74 JobSet pending_jobs_;
84 75
85 DeviceManagementService* service_; 76 DeviceManagementService* service_;
86 77
87 DISALLOW_COPY_AND_ASSIGN(DeviceManagementBackendImpl); 78 DISALLOW_COPY_AND_ASSIGN(DeviceManagementBackendImpl);
88 }; 79 };
89 80
90 } // namespace policy 81 } // namespace policy
91 82
92 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_IMPL_H_ 83 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698