Do not announce robot account token before account ID is available
commitc9e620e90057f214879658eca758493e1ea3cbdb
authorbartfab <bartfab@chromium.org>
Tue, 3 Feb 2015 11:17:05 +0000 (3 03:17 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 3 Feb 2015 11:18:04 +0000 (3 11:18 +0000)
tree1378f841b657b7bee842d3d925be43395786f2cd
parent747c10c3711081eac5161630dbbd18c3fb454433
Do not announce robot account token before account ID is available

When announcing the availability of the robot account token to its
observers, DeviceOAuth2TokenService needs to know both the token and
the robot account ID. During enrollment, the token becomes available
before the account ID. Thus, DeviceOAuth2TokenService needs to wait
for the account ID to be available before announcing the token.

BUG=453828
TEST=New unit test

Review URL: https://codereview.chromium.org/892633003

Cr-Commit-Position: refs/heads/master@{#314312}
chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_unittest.cc
chrome/browser/chromeos/policy/device_cloud_policy_invalidator_unittest.cc
chrome/browser/chromeos/settings/device_oauth2_token_service.cc
chrome/browser/chromeos/settings/device_oauth2_token_service.h
chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h
chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc