Commit 6c468109 authored by Daniel Rubery's avatar Daniel Rubery Committed by Commit Bot

Explicitly initialize pointer in SafeBrowsingPrivateEventRouter

The binary_upload_service_ pointer can sometimes hold uninitialized
data, which leads to calling IsAuthorized() on an invalid object. In
my case this was due to a turned-off feature flag.

Change-Id: I1db50db3350c43f48b45b0b7a310ac83608147b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1884994
Auto-Submit: Daniel Rubery <drubery@chromium.org>
Reviewed-by: default avatarBettina Dea <bdea@chromium.org>
Commit-Queue: Bettina Dea <bdea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710058}
parent 40a1b25d
......@@ -204,7 +204,7 @@ class SafeBrowsingPrivateEventRouter : public KeyedService {
content::BrowserContext* context_;
signin::IdentityManager* identity_manager_ = nullptr;
EventRouter* event_router_ = nullptr;
safe_browsing::BinaryUploadService* binary_upload_service_;
safe_browsing::BinaryUploadService* binary_upload_service_ = nullptr;
std::unique_ptr<policy::CloudPolicyClient> client_;
PrefChangeRegistrar registrar_;
......
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