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

Side by Side Diff: components/policy/core/common/cloud/cloud_policy_client.h

Issue 879233003: Initial RemoteCommandService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remote-commands
Patch Set: fix last_command_id Created 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // Sends an unregistration request to the server. 139 // Sends an unregistration request to the server.
140 virtual void Unregister(); 140 virtual void Unregister();
141 141
142 // Upload a device certificate to the server. Like FetchPolicy, this method 142 // Upload a device certificate to the server. Like FetchPolicy, this method
143 // requires that the client is in a registered state. |certificate_data| must 143 // requires that the client is in a registered state. |certificate_data| must
144 // hold the X.509 certificate data to be sent to the server. The |callback| 144 // hold the X.509 certificate data to be sent to the server. The |callback|
145 // will be called when the operation completes. 145 // will be called when the operation completes.
146 virtual void UploadCertificate(const std::string& certificate_data, 146 virtual void UploadCertificate(const std::string& certificate_data,
147 const StatusCallback& callback); 147 const StatusCallback& callback);
148 148
149 // XXX
150 virtual scoped_ptr<DeviceManagementRequestJob> CreateRemoteCommandsJob();
bartfab (slow) 2015/01/29 10:18:05 Why not have this method create a job and send it
binjin 2015/01/29 10:44:10 That will introduce some logic about how to constr
bartfab (slow) 2015/01/29 15:28:58 If you look at Drew's solution, this is exactly wh
151
149 // Adds an observer to be called back upon policy and state changes. 152 // Adds an observer to be called back upon policy and state changes.
150 void AddObserver(Observer* observer); 153 void AddObserver(Observer* observer);
151 154
152 // Removes the specified observer. 155 // Removes the specified observer.
153 void RemoveObserver(Observer* observer); 156 void RemoveObserver(Observer* observer);
154 157
155 // Sets the status provider for this client, or NULL if no provider. 158 // Sets the status provider for this client, or NULL if no provider.
156 // ClouldPolicyClient takes ownership of the passed |provider|. 159 // ClouldPolicyClient takes ownership of the passed |provider|.
157 void SetStatusProvider(scoped_ptr<StatusProvider> provider); 160 void SetStatusProvider(scoped_ptr<StatusProvider> provider);
158 161
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 ObserverList<Observer, true> observers_; 317 ObserverList<Observer, true> observers_;
315 scoped_refptr<net::URLRequestContextGetter> request_context_; 318 scoped_refptr<net::URLRequestContextGetter> request_context_;
316 319
317 private: 320 private:
318 DISALLOW_COPY_AND_ASSIGN(CloudPolicyClient); 321 DISALLOW_COPY_AND_ASSIGN(CloudPolicyClient);
319 }; 322 };
320 323
321 } // namespace policy 324 } // namespace policy
322 325
323 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_ 326 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698