Index: chrome/browser/ui/search/search_tab_helper.cc |
diff --git a/chrome/browser/ui/search/search_tab_helper.cc b/chrome/browser/ui/search/search_tab_helper.cc |
index d78a8cfbe80fbfc936690b0a5f89714b02387118..3c4af9745d0404d84336acba969a3fbac9c248e9 100644 |
--- a/chrome/browser/ui/search/search_tab_helper.cc |
+++ b/chrome/browser/ui/search/search_tab_helper.cc |
@@ -123,14 +123,15 @@ void RecordNewTabLoadTime(content::WebContents* contents) { |
core_tab_helper->set_new_tab_start_time(base::TimeTicks()); |
} |
-// Returns true if the user is signed in and full history sync is enabled, |
-// and false otherwise. |
+// Returns true if the user wants to sync history. This function returning true |
+// is not a guarantee that history is being synced, but it can be used to |
+// disable a feature that should not be shown to users who prefer not to sync |
+// their history. |
bool IsHistorySyncEnabled(Profile* profile) { |
ProfileSyncService* sync = |
ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile); |
return sync && |
- sync->SyncActive() && |
- sync->GetActiveDataTypes().Has(syncer::HISTORY_DELETE_DIRECTIVES); |
+ sync->GetPreferredDataTypes().Has(syncer::HISTORY_DELETE_DIRECTIVES); |
} |
bool OmniboxHasFocus(OmniboxView* omnibox) { |