Chromium Code Reviews| Index: chrome/browser/ui/search/search_ipc_router.h |
| diff --git a/chrome/browser/ui/search/search_ipc_router.h b/chrome/browser/ui/search/search_ipc_router.h |
| index b2af4efc6c9a724ed8e5159114508f4c3484a987..66341331be3e42056ca0cd4b81a71a3639caca7e 100644 |
| --- a/chrome/browser/ui/search/search_ipc_router.h |
| +++ b/chrome/browser/ui/search/search_ipc_router.h |
| @@ -77,11 +77,15 @@ class SearchIPCRouter : public content::WebContentsObserver { |
| // Called when the SearchBox wants to verify the signed-in Chrome identity |
| // against the provided |identity|. Will make a round-trip to the browser |
| // and eventually return the result through SendChromeIdentityCheckResult. |
| - // Calls SendChromeIdentityCheckResult with true if both the identity |
| - // matches and the user syncs their history. |
| - // TODO(beaudoin): Change this function name and related APIs now that it's |
| - // checking both the identity and the user's sync state. |
| + // Calls SendChromeIdentityCheckResult with true if the identity matches. |
| virtual void OnChromeIdentityCheck(const base::string16& identity) = 0; |
| + |
| + // Called when the SearchBox wants to verify the signed-in Chrome identity |
| + // against the provided |identity|. Will make a round-trip to the browser |
| + // and eventually return the result through SendHistorySyncCheckResult. |
| + // Calls SendHistorySyncCheckResult with true if the user syncs their |
| + // history. |
| + virtual void OnHistorySyncCheck() = 0; |
| }; |
| // An interface to be implemented by consumers of SearchIPCRouter objects to |
| @@ -102,6 +106,7 @@ class SearchIPCRouter : public content::WebContentsObserver { |
| virtual bool ShouldProcessLogEvent() = 0; |
| virtual bool ShouldProcessPasteIntoOmnibox(bool is_active_tab) = 0; |
| virtual bool ShouldProcessChromeIdentityCheck() = 0; |
| + virtual bool ShouldProcessHistorySyncCheck() = 0; |
| virtual bool ShouldSendSetPromoInformation() = 0; |
| virtual bool ShouldSendSetDisplayInstantResults() = 0; |
| virtual bool ShouldSendSetSuggestionToPrefetch() = 0; |
| @@ -130,6 +135,9 @@ class SearchIPCRouter : public content::WebContentsObserver { |
| void SendChromeIdentityCheckResult(const base::string16& identity, |
| bool identity_match); |
| + // Tells the renderer whether the user sync his history. |
|
dcheng
2014/11/12 21:40:47
syncs
kmadhusu
2014/11/19 19:56:19
nit: Please avoid using "his/her" in the comment.
beaudoin
2014/11/20 22:58:26
Done.
beaudoin
2014/11/20 22:58:26
Done.
|
| + void SendHistorySyncCheckResult(bool sync_history); |
| + |
| // Tells the renderer information it needs to display promos. |
| void SetPromoInformation(bool is_app_launcher_enabled); |
| @@ -208,6 +216,7 @@ class SearchIPCRouter : public content::WebContentsObserver { |
| const base::string16& text) const; |
| void OnChromeIdentityCheck(int page_seq_no, |
| const base::string16& identity) const; |
| + void OnHistorySyncCheck(int page_seq_no) const; |
| // Used by unit tests to set a fake delegate. |
| void set_delegate_for_testing(Delegate* delegate); |