Commit 9ff0ec4c authored by Jeremy Roman's avatar Jeremy Roman Committed by Commit Bot

Only log DICE disablement due to missing OAuth ID/secret once.

This reduces noise due to this warning, which can happen on the order
of 10 times at browser launch and more times thereafter.

Change-Id: Iecdb28d995eb5867a506f84112ef8fcf8794dbce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2160037Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762047}
parent da9549bd
......@@ -197,8 +197,14 @@ AccountConsistencyModeManager::ComputeAccountConsistencyMethod(
bool can_enable_dice_for_build = ignore_missing_oauth_client_for_testing_ ||
google_apis::HasOAuthClientConfigured();
if (!can_enable_dice_for_build) {
// Only log this once.
static bool logged_warning = []() {
LOG(WARNING) << "Desktop Identity Consistency cannot be enabled as no "
"OAuth client ID and client secret have been configured.";
return true;
}();
ALLOW_UNUSED_LOCAL(logged_warning);
return AccountConsistencyMethod::kDisabled;
}
......
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