Commit aee84de3 authored by Tanmoy Mollik's avatar Tanmoy Mollik Committed by Chromium LUCI CQ

Convert components/feed/* to OnPrimaryAccountChanged()

Method OnPrimaryAccountSet/Cleared is deprecated. So this cl changes
these calls to OnPrimaryAccountChanged.

Bug: 1158855
Change-Id: I2321624081eca7fea760c22189bb0524fd849d63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2599807Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841045}
parent e9569be8
......@@ -153,13 +153,18 @@ class FeedService::IdentityManagerObserverImpl
~IdentityManagerObserverImpl() override {
identity_manager_->RemoveObserver(this);
}
void OnPrimaryAccountSet(
const CoreAccountInfo& primary_account_info) override {
feed_stream_->OnSignedIn();
}
void OnPrimaryAccountCleared(
const CoreAccountInfo& previous_primary_account_info) override {
feed_stream_->OnSignedOut();
void OnPrimaryAccountChanged(
const signin::PrimaryAccountChangeEvent& event) override {
switch (event.GetEventTypeFor(signin::ConsentLevel::kSync)) {
case signin::PrimaryAccountChangeEvent::Type::kSet:
feed_stream_->OnSignedIn();
return;
case signin::PrimaryAccountChangeEvent::Type::kCleared:
feed_stream_->OnSignedOut();
return;
case signin::PrimaryAccountChangeEvent::Type::kNone:
return;
}
}
private:
......
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