Skip to content

Commit

Permalink
Modernize {Dictionary,List}PrefUpdate in /chrome/browser/login_detection
Browse files Browse the repository at this point in the history
This cl replaces instances of DictionaryPrefUpdateDeprecated, which
wraps the deprecated base::DictionaryValue, with DictionaryPrefUpdate,
which wraps base::Value. This cl also does the equivalent for
ListPrefUpdateDeprecated. A range of other base::Value modernization
changes are made to allow these replacements and as drive-by fixes.
This cl handles the directory /chrome/browser/login_detection

This CL was uploaded by git cl split.

R=sophiechang@chromium.org

Bug: 1285745
Change-Id: I65e6f4b1cbd0219274e66ed1f92dec393765150e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3386007
Auto-Submit: Alex Turner <alexmt@chromium.org>
Reviewed-by: Sophie Chang <sophiechang@chromium.org>
Commit-Queue: Sophie Chang <sophiechang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#958690}
  • Loading branch information
alexmturner authored and Chromium LUCI CQ committed Jan 13, 2022
1 parent f1fcc54 commit 8c4521c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chrome/browser/login_detection/login_detection_prefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ void RemoveLoginDetectionData(PrefService* prefs) {
}

void SaveSiteToOAuthSignedInList(PrefService* pref_service, const GURL& url) {
DictionaryPrefUpdateDeprecated update(pref_service, kOAuthSignedInSitesPref);
base::DictionaryValue* dict = update.Get();
DictionaryPrefUpdate update(pref_service, kOAuthSignedInSitesPref);
base::Value* dict = update.Get();
dict->SetKey(GetSiteNameForURL(url), base::TimeToValue(base::Time::Now()));

// Try making space by removing sites having invalid sign-in time. This should
Expand Down

0 comments on commit 8c4521c

Please sign in to comment.