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..74ee1b75a992a71ad46e8d1825bfd0e6ee0e73f1 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's preference indicates he wants to sync history. |
Jered
2015/02/19 16:01:38
nit: reword this to "Returns true if the user want
beaudoin
2015/02/20 00:25:50
Done.
|
+// 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() && |
Jered
2015/02/19 16:01:38
Did you mean to remove the call to SyncActive? The
beaudoin
2015/02/20 00:25:50
Yup, this is actually what was causing the problem
|
- sync->GetActiveDataTypes().Has(syncer::HISTORY_DELETE_DIRECTIVES); |
+ sync->GetPreferredDataTypes().Has(syncer::HISTORY_DELETE_DIRECTIVES); |
} |
bool OmniboxHasFocus(OmniboxView* omnibox) { |