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

Side by Side Diff: components/ntp_snippets/ntp_snippets_status_service.h

Issue 2319553005: Remove NTPSnippetsService::disabled_reason(). (Closed)
Patch Set: x Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « components/ntp_snippets/ntp_snippets_service.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_STATUS_SERVICE_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_STATUS_SERVICE_H_
6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_STATUS_SERVICE_H_ 6 #define COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_STATUS_SERVICE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/scoped_observer.h" 10 #include "base/scoped_observer.h"
(...skipping 24 matching lines...) Expand all
35 PrefService* pref_service); 35 PrefService* pref_service);
36 36
37 ~NTPSnippetsStatusService() override; 37 ~NTPSnippetsStatusService() override;
38 38
39 static void RegisterProfilePrefs(PrefRegistrySimple* registry); 39 static void RegisterProfilePrefs(PrefRegistrySimple* registry);
40 40
41 // Starts listening for changes from the dependencies. |callback| will be 41 // Starts listening for changes from the dependencies. |callback| will be
42 // called when a significant change in state is detected. 42 // called when a significant change in state is detected.
43 void Init(const DisabledReasonChangeCallback& callback); 43 void Init(const DisabledReasonChangeCallback& callback);
44 44
45 DisabledReason disabled_reason() const { return disabled_reason_; }
46
47 private: 45 private:
48 FRIEND_TEST_ALL_PREFIXES(NTPSnippetsStatusServiceTest, 46 FRIEND_TEST_ALL_PREFIXES(NTPSnippetsStatusServiceTest,
49 SigninStateCompatibility); 47 SigninStateCompatibility);
50 FRIEND_TEST_ALL_PREFIXES(NTPSnippetsStatusServiceTest, DisabledViaPref); 48 FRIEND_TEST_ALL_PREFIXES(NTPSnippetsStatusServiceTest, DisabledViaPref);
51 49
52 // SigninManagerBase::Observer implementation 50 // SigninManagerBase::Observer implementation
53 void GoogleSigninSucceeded(const std::string& account_id, 51 void GoogleSigninSucceeded(const std::string& account_id,
54 const std::string& username, 52 const std::string& username,
55 const std::string& password) override; 53 const std::string& password) override;
56 void GoogleSignedOut(const std::string& account_id, 54 void GoogleSignedOut(const std::string& account_id,
(...skipping 16 matching lines...) Expand all
73 // The observer for the SigninManager. 71 // The observer for the SigninManager.
74 ScopedObserver<SigninManagerBase, SigninManagerBase::Observer> 72 ScopedObserver<SigninManagerBase, SigninManagerBase::Observer>
75 signin_observer_; 73 signin_observer_;
76 74
77 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsStatusService); 75 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsStatusService);
78 }; 76 };
79 77
80 } // namespace ntp_snippets 78 } // namespace ntp_snippets
81 79
82 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_STATUS_SERVICE_H_ 80 #endif // COMPONENTS_NTP_SNIPPETS_NTP_SNIPPETS_STATUS_SERVICE_H_
OLDNEW
« no previous file with comments | « components/ntp_snippets/ntp_snippets_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698