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

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

Issue 197313004: Support policy registration using a preobtained access token. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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_registration_helper.h
diff --git a/components/policy/core/common/cloud/cloud_policy_client_registration_helper.h b/components/policy/core/common/cloud/cloud_policy_client_registration_helper.h
index cb16a23d12de173d1fc9a3c3fa5827d561b813b3..721282aad478e450f0b305104dcd9f7f31a8de04 100644
--- a/components/policy/core/common/cloud/cloud_policy_client_registration_helper.h
+++ b/components/policy/core/common/cloud/cloud_policy_client_registration_helper.h
@@ -6,6 +6,7 @@
#define COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_REGISTRATION_HELPER_H_
#include <string>
+#include <vector>
#include "base/basictypes.h"
#include "base/callback.h"
@@ -52,6 +53,15 @@ class POLICY_EXPORT CloudPolicyClientRegistrationHelper
// |callback| is invoked when the registration is complete.
void StartRegistrationWithLoginToken(const std::string& login_refresh_token,
const base::Closure& callback);
+
+ // Starts the client registration process. |access_token| must be a valid
+ // OAuth access token for the scopes returned by the |GetScopes| static
+ // function.
+ void StartRegistrationWithAccessToken(const std::string& access_token,
+ const base::Closure& callback);
+
+ // Returns the scopes required for policy client registration.
+ static std::vector<std::string> GetScopes();
#endif
private:

Powered by Google App Engine
This is Rietveld 408576698