Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if sync enabled before calling (crash fix) (uplift to 1.43.x) #15039

Merged
merged 1 commit into from
Sep 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions chromium_src/chrome/browser/ui/webui/settings/people_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@

// IsSetupInProgress isn't accurate in brave sync flow especially for the first
// time setup, we rely on it to display setup dialog
#define BRAVE_GET_SYNC_STATUS_DICTIONARY \
sync_status.SetBoolPath( \
"firstSetupInProgress", \
service && !disallowed_by_policy && \
!service->GetUserSettings()->IsFirstSetupComplete()); \
{ \
syncer::BraveSyncServiceImpl* brave_sync_service = \
static_cast<syncer::BraveSyncServiceImpl*>(service); \
bool failed_to_decrypt = false; \
brave_sync_service->prefs().GetSeed(&failed_to_decrypt); \
sync_status.SetBoolPath("hasSyncWordsDecryptionError", failed_to_decrypt); \
#define BRAVE_GET_SYNC_STATUS_DICTIONARY \
sync_status.SetBoolPath( \
"firstSetupInProgress", \
service && !disallowed_by_policy && \
!service->GetUserSettings()->IsFirstSetupComplete()); \
{ \
syncer::BraveSyncServiceImpl* brave_sync_service = \
static_cast<syncer::BraveSyncServiceImpl*>(service); \
if (brave_sync_service) { \
bool failed_to_decrypt = false; \
brave_sync_service->prefs().GetSeed(&failed_to_decrypt); \
sync_status.SetBoolPath("hasSyncWordsDecryptionError", \
failed_to_decrypt); \
} \
}

#include "src/chrome/browser/ui/webui/settings/people_handler.cc"
Expand Down