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 ...@@ -153,13 +153,18 @@ class FeedService::IdentityManagerObserverImpl
~IdentityManagerObserverImpl() override { ~IdentityManagerObserverImpl() override {
identity_manager_->RemoveObserver(this); identity_manager_->RemoveObserver(this);
} }
void OnPrimaryAccountSet( void OnPrimaryAccountChanged(
const CoreAccountInfo& primary_account_info) override { const signin::PrimaryAccountChangeEvent& event) override {
feed_stream_->OnSignedIn(); switch (event.GetEventTypeFor(signin::ConsentLevel::kSync)) {
} case signin::PrimaryAccountChangeEvent::Type::kSet:
void OnPrimaryAccountCleared( feed_stream_->OnSignedIn();
const CoreAccountInfo& previous_primary_account_info) override { return;
feed_stream_->OnSignedOut(); case signin::PrimaryAccountChangeEvent::Type::kCleared:
feed_stream_->OnSignedOut();
return;
case signin::PrimaryAccountChangeEvent::Type::kNone:
return;
}
} }
private: 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