Index: chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.h |
diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.h b/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.h |
index 9ac909283d3cbce671210e3b71cd6af9b6520d8c..cf067fe757762250f4ac4e00eefece09245855d5 100644 |
--- a/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.h |
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.h |
@@ -7,6 +7,7 @@ |
#include <string> |
+#include "base/prefs/public/pref_change_registrar.h" |
#include "chrome/browser/sync/profile_sync_service.h" |
#include "chrome/browser/sync/sync_ui_util.h" |
#include "content/public/browser/web_ui_message_handler.h" |
@@ -34,14 +35,17 @@ class NewTabPageSyncHandler : public content::WebUIMessageHandler, |
// ProfileSyncServiceObserver |
virtual void OnStateChanged() OVERRIDE; |
+ void OnSigninAllowedPrefChange(); |
+ |
private: |
+ friend class NewTabPageSyncHandlerTest; |
enum MessageType { |
HIDE, |
SYNC_ERROR, |
SYNC_PROMO |
}; |
// Helper to invoke the |syncMessageChanged| JS function on the new tab page. |
- void SendSyncMessageToPage(MessageType type, |
+ virtual void SendSyncMessageToPage(MessageType type, |
std::string msg, std::string linktext); |
sail
2013/02/08 20:18:57
indentation is incorrect
Adrian Kuegel
2013/02/11 16:47:30
Yes, sorry about that, I forgot to fix it when I a
|
// Helper to query the sync service and figure out what to send to |
@@ -59,6 +63,8 @@ class NewTabPageSyncHandler : public content::WebUIMessageHandler, |
// Cached pointer to ProfileSyncService. |
ProfileSyncService* sync_service_; |
+ PrefChangeRegistrar profile_pref_registrar_; |
+ |
// Used to make sure we don't register ourselves twice if the user refreshes |
// the new tab page. |
bool waiting_for_initial_page_load_; |