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

Unified Diff: components/policy/core/common/cloud/cloud_policy_client.h

Issue 1258313002: Send GCM id to DMServer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adopt upstream protobuf changes Created 5 years, 4 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: components/policy/core/common/cloud/cloud_policy_client.h
diff --git a/components/policy/core/common/cloud/cloud_policy_client.h b/components/policy/core/common/cloud/cloud_policy_client.h
index 41e87f7341b39dfb9b1dbec9887d6f01f2fe28dd..c672700cc8517cac283b7f64f8252a6f2a6fcc02 100644
--- a/components/policy/core/common/cloud/cloud_policy_client.h
+++ b/components/policy/core/common/cloud/cloud_policy_client.h
@@ -172,6 +172,12 @@ class POLICY_EXPORT CloudPolicyClient {
const std::string& location,
const StatusCallback& callback);
+ // Sends a GCM id update request to the DM server. The server will
+ // associate the DM token in authorization header with |gcm_id|, and
+ // |callback| will be called when the operation completes.
+ virtual void UpdateGcmId(const std::string& gcm_id,
+ const StatusCallback& callback);
+
// Adds an observer to be called back upon policy and state changes.
void AddObserver(Observer* observer);
@@ -325,6 +331,14 @@ class POLICY_EXPORT CloudPolicyClient {
int net_error,
const enterprise_management::DeviceManagementResponse& response);
+ // Callback for gcm id update requests.
+ void OnGcmIdUpdated(
+ const DeviceManagementRequestJob* job,
+ const StatusCallback& callback,
+ DeviceManagementStatus status,
+ int net_error,
+ const enterprise_management::DeviceManagementResponse& response);
+
// Helper to remove a job from request_jobs_.
void RemoveJob(const DeviceManagementRequestJob* job);

Powered by Google App Engine
This is Rietveld 408576698