Fix order of UMA sampling when handling errors on initial policy fetch.

BUG=271321

Review URL: https://chromiumcodereview.appspot.com/23847005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221999 0039d316-1c4b-4281-b951-d872f2087c98
parent 473a336d
...@@ -235,12 +235,11 @@ void UserCloudPolicyManagerChromeOS::OnRegistrationStateChanged( ...@@ -235,12 +235,11 @@ void UserCloudPolicyManagerChromeOS::OnRegistrationStateChanged(
void UserCloudPolicyManagerChromeOS::OnClientError( void UserCloudPolicyManagerChromeOS::OnClientError(
CloudPolicyClient* cloud_policy_client) { CloudPolicyClient* cloud_policy_client) {
DCHECK_EQ(client(), cloud_policy_client); DCHECK_EQ(client(), cloud_policy_client);
CancelWaitForPolicyFetch();
if (wait_for_policy_fetch_) { if (wait_for_policy_fetch_) {
UMA_HISTOGRAM_SPARSE_SLOWLY(kUMAInitialFetchClientError, UMA_HISTOGRAM_SPARSE_SLOWLY(kUMAInitialFetchClientError,
cloud_policy_client->status()); cloud_policy_client->status());
} }
CancelWaitForPolicyFetch();
} }
void UserCloudPolicyManagerChromeOS::OnComponentCloudPolicyRefreshNeeded() { void UserCloudPolicyManagerChromeOS::OnComponentCloudPolicyRefreshNeeded() {
...@@ -306,7 +305,6 @@ void UserCloudPolicyManagerChromeOS::OnOAuth2PolicyTokenFetched( ...@@ -306,7 +305,6 @@ void UserCloudPolicyManagerChromeOS::OnOAuth2PolicyTokenFetched(
void UserCloudPolicyManagerChromeOS::OnInitialPolicyFetchComplete( void UserCloudPolicyManagerChromeOS::OnInitialPolicyFetchComplete(
bool success) { bool success) {
const base::Time now = base::Time::Now(); const base::Time now = base::Time::Now();
UMA_HISTOGRAM_TIMES(kUMAInitialFetchDelayPolicyFetch, UMA_HISTOGRAM_TIMES(kUMAInitialFetchDelayPolicyFetch,
now - time_client_registered_); now - time_client_registered_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment