Commit e729dfe8 authored by kcarattini's avatar kcarattini Committed by Commit bot

Hotword: Only run the Audio History callback with 'success' if there is a valid response

BUG=466378

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

Cr-Commit-Position: refs/heads/master@{#320834}
parent c7173640
......@@ -477,7 +477,11 @@ void WebHistoryService::AudioHistoryCompletionCallback(
if (response_value)
response_value->GetBoolean("history_recording_enabled", &enabled_value);
}
callback.Run(success, enabled_value);
// If there is no response_value, then for our purposes, the request has
// failed, despite receiving a true |success| value. This can happen if
// the user is offline.
callback.Run(success && response_value, enabled_value);
}
} // namespace history
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