Index: components/search_engines/template_url_service.h |
diff --git a/components/search_engines/template_url_service.h b/components/search_engines/template_url_service.h |
index 3f32b11e7443d989c9340e44f5ea01d01f9ccc60..418b53e46fb4662c0579ca7c16f861473aa74ed0 100644 |
--- a/components/search_engines/template_url_service.h |
+++ b/components/search_engines/template_url_service.h |
@@ -625,6 +625,20 @@ class TemplateURLService : public WebDataServiceConsumer, |
bool IsLocalTemplateURLBetter(const TemplateURL* local_turl, |
const TemplateURL* sync_turl); |
+ // Returns true iff |local_turl| is considered "better" than |sync_turl| for |
+ // the purposes of resolving a conflicting prepopulate_id. |local_turl| must |
+ // be a TemplateURL known to the local model (though it may already be |
+ // synced), and |sync_turl| is a new TemplateURL known to Sync but not yet |
+ // known to the local model. |
+ // The criteria for if |local_turl| is better than |sync_turl| is whether |
+ // either of the following is true: |
+ // * |local_turl|'s last_modified timestamp is newer than sync_turl. |
+ // * |local_turl| is created by policy. |
+ // Note that even if the local turl is the default search provider, the remote |
+ // url can still be considered better. |
+ bool IsLocalPrepopulatedTemplateURLBetter(const TemplateURL* local_turl, |
+ const TemplateURL* sync_turl); |
Peter Kasting
2016/06/14 19:21:26
Nit: I'd combine these two functions into one and
Patrick Noland
2016/06/14 22:55:24
Done.
|
+ |
// Given two synced TemplateURLs with a conflicting keyword, one of which |
// needs to be added to or updated in the local model (|unapplied_sync_turl|) |
// and one which is already known to the local model (|applied_sync_turl|), |