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

Unified Diff: chrome/browser/chromeos/policy/enrollment_handler_chromeos.h

Issue 34523003: settings: Make DeviceOAuth2TokenServiceFactory::Get() async (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 7 years, 2 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: chrome/browser/chromeos/policy/enrollment_handler_chromeos.h
diff --git a/chrome/browser/chromeos/policy/enrollment_handler_chromeos.h b/chrome/browser/chromeos/policy/enrollment_handler_chromeos.h
index 74b0fd17bc00b80386cbf9cc134c27f4bd3d802d..f6d48b11989df9b296490cb4e5d37ff26c243a3c 100644
--- a/chrome/browser/chromeos/policy/enrollment_handler_chromeos.h
+++ b/chrome/browser/chromeos/policy/enrollment_handler_chromeos.h
@@ -23,6 +23,10 @@ namespace base {
class SequencedTaskRunner;
}
+namespace chromeos {
+class DeviceOAuth2TokenService;
+}
+
namespace enterprise_management {
class PolicyFetchResponse;
}
@@ -142,6 +146,9 @@ class EnrollmentHandlerChromeOS : public CloudPolicyClient::Observer,
// Reports the result of the enrollment process to the initiator.
void ReportResult(EnrollmentStatus status);
+ // Continuation of OnStoreLoaded().
+ void DidGetTokenService(chromeos::DeviceOAuth2TokenService* token_service);
+
DeviceCloudPolicyStoreChromeOS* store_;
EnterpriseInstallAttributes* install_attributes_;
scoped_ptr<CloudPolicyClient> client_;
@@ -171,7 +178,12 @@ class EnrollmentHandlerChromeOS : public CloudPolicyClient::Observer,
// initialization.
int lockbox_init_duration_;
- base::WeakPtrFactory<EnrollmentHandlerChromeOS> weak_factory_;
+ // Used for locking the device.
+ base::WeakPtrFactory<EnrollmentHandlerChromeOS> lock_weak_factory_;
+
+ // Used for getting the OAuth2 token service. This needs to be separate
+ // as lock_weak_factory_ could be invalidated at a random time.
+ base::WeakPtrFactory<EnrollmentHandlerChromeOS> token_weak_factory_;
DISALLOW_COPY_AND_ASSIGN(EnrollmentHandlerChromeOS);
};

Powered by Google App Engine
This is Rietveld 408576698