| Index: chrome/browser/cryptauth/chrome_cryptauth_service.h
|
| diff --git a/chrome/browser/cryptauth/chrome_cryptauth_service.h b/chrome/browser/cryptauth/chrome_cryptauth_service.h
|
| index 21f8f70006b03bde22a8af41dd4ac1db991dfa12..9aa6c11e119d706b81c5d5c28b18398080c4da57 100644
|
| --- a/chrome/browser/cryptauth/chrome_cryptauth_service.h
|
| +++ b/chrome/browser/cryptauth/chrome_cryptauth_service.h
|
| @@ -8,6 +8,7 @@
|
| #include <memory>
|
|
|
| #include "base/macros.h"
|
| +#include "components/cryptauth/cryptauth_enrollment_manager.h"
|
| #include "components/cryptauth/cryptauth_service.h"
|
| #include "components/cryptauth/proto/cryptauth_api.pb.h"
|
| #include "components/keyed_service/core/keyed_service.h"
|
| @@ -20,9 +21,11 @@ class CryptAuthGCMManager;
|
| } // namespace cryptauth
|
|
|
| // Implementation of cryptauth::CryptAuthService.
|
| -class ChromeCryptAuthService : public KeyedService,
|
| - public cryptauth::CryptAuthService,
|
| - public OAuth2TokenService::Observer {
|
| +class ChromeCryptAuthService
|
| + : public KeyedService,
|
| + public cryptauth::CryptAuthService,
|
| + public cryptauth::CryptAuthEnrollmentManager::Observer,
|
| + public OAuth2TokenService::Observer {
|
| public:
|
| static std::unique_ptr<ChromeCryptAuthService> Create(Profile* profile);
|
| ~ChromeCryptAuthService() override;
|
| @@ -41,6 +44,10 @@ class ChromeCryptAuthService : public KeyedService,
|
| std::unique_ptr<cryptauth::CryptAuthClientFactory>
|
| CreateCryptAuthClientFactory() override;
|
|
|
| + // cryptauth::CryptAuthEnrollmentManager::Observer:
|
| + void OnEnrollmentStarted() override;
|
| + void OnEnrollmentFinished(bool success) override;
|
| +
|
| protected:
|
| // Note: ChromeCryptAuthServiceFactory DependsOn(OAuth2TokenServiceFactory),
|
| // so |token_service| is guaranteed to outlast this service.
|
| @@ -55,6 +62,8 @@ class ChromeCryptAuthService : public KeyedService,
|
| // OAuth2TokenService::Observer:
|
| void OnRefreshTokenAvailable(const std::string& account_id) override;
|
|
|
| + void PerformEnrollmentAndDeviceSync();
|
| +
|
| std::unique_ptr<cryptauth::CryptAuthGCMManager> gcm_manager_;
|
| std::unique_ptr<cryptauth::CryptAuthEnrollmentManager> enrollment_manager_;
|
| std::unique_ptr<cryptauth::CryptAuthDeviceManager> device_manager_;
|
|
|