| Index: chrome/browser/ui/webui/ntp/ntp_login_handler.h
|
| diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.h b/chrome/browser/ui/webui/ntp/ntp_login_handler.h
|
| index 331caf9ec2dc53c1150aa3200575d6aded2326a9..a00b313c58fd3adef415c6338bf9d76612f09607 100644
|
| --- a/chrome/browser/ui/webui/ntp/ntp_login_handler.h
|
| +++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NTP_LOGIN_HANDLER_H_
|
| #define CHROME_BROWSER_UI_WEBUI_NTP_NTP_LOGIN_HANDLER_H_
|
|
|
| +#include "base/prefs/public/pref_observer.h"
|
| #include "chrome/browser/api/prefs/pref_member.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| @@ -16,7 +17,8 @@ class Profile;
|
| // username at the top of the NTP (and update itself when that changes).
|
| // In the future it may expand to allow users to login from the NTP.
|
| class NTPLoginHandler : public content::WebUIMessageHandler,
|
| - public content::NotificationObserver {
|
| + public content::NotificationObserver,
|
| + public PrefObserver {
|
| public:
|
| NTPLoginHandler();
|
| virtual ~NTPLoginHandler();
|
| @@ -29,6 +31,10 @@ class NTPLoginHandler : public content::WebUIMessageHandler,
|
| const content::NotificationSource& source,
|
| const content::NotificationDetails& details) OVERRIDE;
|
|
|
| + // PrefObserver interface
|
| + virtual void OnPreferenceChanged(PrefServiceBase* service,
|
| + const std::string& pref_name) OVERRIDE;
|
| +
|
| // Returns true if the login handler should be shown in a new tab page
|
| // for the given |profile|. |profile| must not be NULL.
|
| static bool ShouldShow(Profile* profile);
|
|
|