Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(754)

Unified Diff: components/signin/core/browser/account_tracker_service.cc

Issue 2187743003: Do not crash if no Account Info Preferences exist (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Proper code formatting Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/signin/core/browser/account_tracker_service.cc
diff --git a/components/signin/core/browser/account_tracker_service.cc b/components/signin/core/browser/account_tracker_service.cc
index b1dc370db2b727dddebcc37796f50de2687905b8..fc97379bff0580b1ddd8f0ab31b3c681259d6d5f 100644
--- a/components/signin/core/browser/account_tracker_service.cc
+++ b/components/signin/core/browser/account_tracker_service.cc
@@ -308,6 +308,8 @@ void AccountTrackerService::MigrateToGaiaId() {
void AccountTrackerService::LoadFromPrefs() {
const base::ListValue* list =
signin_client_->GetPrefs()->GetList(kAccountInfoPref);
+ if (list == nullptr)
+ return;
std::set<std::string> to_remove;
bool contains_deprecated_service_flags = false;
for (size_t i = 0; i < list->GetSize(); ++i) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698