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

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

Issue 6532019: New policy protobuf protocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix one more leak 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.
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>
(...skipping 18 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.
39 static const char kValueRequestPolicy[]; 41 static const char kValueRequestPolicy[];
42 static const char kValueRequestCloudPolicy[];
40 static const char kValueDeviceType[]; 43 static const char kValueDeviceType[];
41 static const char kValueAppType[]; 44 static const char kValueAppType[];
42 45
43 private: 46 private:
44 friend class DeviceManagementJobBase; 47 friend class DeviceManagementJobBase;
45 48
46 typedef std::set<DeviceManagementJobBase*> JobSet; 49 typedef std::set<DeviceManagementJobBase*> JobSet;
47 50
48 // Called by the DeviceManagementJobBase dtor so we can clean up. 51 // Called by the DeviceManagementJobBase dtor so we can clean up.
49 void JobDone(DeviceManagementJobBase* job); 52 void JobDone(DeviceManagementJobBase* job);
50 53
51 // Add a job to the pending job set and register it with the service (if 54 // Add a job to the pending job set and register it with the service (if
52 // available). 55 // available).
53 void AddJob(DeviceManagementJobBase* job); 56 void AddJob(DeviceManagementJobBase* job);
54 57
55 // DeviceManagementBackend overrides. 58 // DeviceManagementBackend overrides.
56 virtual void ProcessRegisterRequest( 59 virtual void ProcessRegisterRequest(
57 const std::string& auth_token, 60 const std::string& auth_token,
58 const std::string& device_id, 61 const std::string& device_id,
59 const em::DeviceRegisterRequest& request, 62 const em::DeviceRegisterRequest& request,
60 DeviceRegisterResponseDelegate* response_delegate); 63 DeviceRegisterResponseDelegate* response_delegate);
61 virtual void ProcessUnregisterRequest( 64 virtual void ProcessUnregisterRequest(
62 const std::string& device_management_token, 65 const std::string& device_management_token,
63 const std::string& device_id, 66 const std::string& device_id,
64 const em::DeviceUnregisterRequest& request, 67 const em::DeviceUnregisterRequest& request,
65 DeviceUnregisterResponseDelegate* response_delegate); 68 DeviceUnregisterResponseDelegate* response_delegate);
69 // Deprecated in favor of ProcessCloudPolicyRequest.
70 // See DevicePolicyResponseDelegate::HandlePolicyResponse.
66 virtual void ProcessPolicyRequest( 71 virtual void ProcessPolicyRequest(
67 const std::string& device_management_token, 72 const std::string& device_management_token,
68 const std::string& device_id, 73 const std::string& device_id,
69 const em::DevicePolicyRequest& request, 74 const em::DevicePolicyRequest& request,
70 DevicePolicyResponseDelegate* response_delegate); 75 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);
71 81
72 // Keeps track of the jobs currently in flight. 82 // Keeps track of the jobs currently in flight.
73 JobSet pending_jobs_; 83 JobSet pending_jobs_;
74 84
75 DeviceManagementService* service_; 85 DeviceManagementService* service_;
76 86
77 DISALLOW_COPY_AND_ASSIGN(DeviceManagementBackendImpl); 87 DISALLOW_COPY_AND_ASSIGN(DeviceManagementBackendImpl);
78 }; 88 };
79 89
80 } // namespace policy 90 } // namespace policy
81 91
82 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_IMPL_H_ 92 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698