Chromium Code Reviews| Index: components/ntp_snippets/remote/ntp_snippets_status_service.h |
| diff --git a/components/ntp_snippets/remote/ntp_snippets_status_service.h b/components/ntp_snippets/remote/ntp_snippets_status_service.h |
| index 2f8f47a76356edc691709c67b0c6eddc5cb96b49..9196541d56920a5e28b5952378aeb21db16da610 100644 |
| --- a/components/ntp_snippets/remote/ntp_snippets_status_service.h |
| +++ b/components/ntp_snippets/remote/ntp_snippets_status_service.h |
| @@ -9,10 +9,10 @@ |
| #include "base/gtest_prod_util.h" |
| #include "base/scoped_observer.h" |
| #include "components/prefs/pref_change_registrar.h" |
| -#include "components/signin/core/browser/signin_manager.h" |
| class PrefRegistrySimple; |
| class PrefService; |
| +class SigninManagerBase; |
| namespace ntp_snippets { |
| @@ -29,7 +29,7 @@ enum class SnippetsStatus : int { |
| // Aggregates data from preferences and signin to notify the snippet service of |
| // relevant changes in their states. |
| -class NTPSnippetsStatusService : public SigninManagerBase::Observer { |
| +class NTPSnippetsStatusService { |
| public: |
| using SnippetsStatusChangeCallback = |
| base::Callback<void(SnippetsStatus /*old_status*/, |
| @@ -38,7 +38,7 @@ class NTPSnippetsStatusService : public SigninManagerBase::Observer { |
| NTPSnippetsStatusService(SigninManagerBase* signin_manager, |
| PrefService* pref_service); |
| - ~NTPSnippetsStatusService() override; |
| + virtual ~NTPSnippetsStatusService(); |
| static void RegisterProfilePrefs(PrefRegistrySimple* registry); |
| @@ -46,16 +46,11 @@ class NTPSnippetsStatusService : public SigninManagerBase::Observer { |
| // called when a significant change in state is detected. |
| void Init(const SnippetsStatusChangeCallback& callback); |
| + void OnSignInStateChanged(); |
|
Marc Treib
2016/11/21 15:48:53
Add a comment?
dgn
2016/11/21 16:22:08
Done.
|
| + |
| private: |
| FRIEND_TEST_ALL_PREFIXES(NTPSnippetsStatusServiceTest, DisabledViaPref); |
| - // SigninManagerBase::Observer implementation |
| - void GoogleSigninSucceeded(const std::string& account_id, |
| - const std::string& username, |
| - const std::string& password) override; |
| - void GoogleSignedOut(const std::string& account_id, |
| - const std::string& username) override; |
| - |
| // Callback for the PrefChangeRegistrar. |
| void OnSnippetsEnabledChanged(); |
| @@ -74,10 +69,6 @@ class NTPSnippetsStatusService : public SigninManagerBase::Observer { |
| PrefChangeRegistrar pref_change_registrar_; |
| - // The observer for the SigninManager. |
| - ScopedObserver<SigninManagerBase, SigninManagerBase::Observer> |
| - signin_observer_; |
| - |
| DISALLOW_COPY_AND_ASSIGN(NTPSnippetsStatusService); |
| }; |