Home | History | Annotate | Download | only in search_engines

Lines Matching refs:TemplateURL

34 class TemplateURL;
64 // TemplateURLService takes ownership of any TemplateURL passed to it. If there
74 typedef std::vector<TemplateURL*> TemplateURLVector;
81 // Each initializer is mapped to a TemplateURL.
122 static void SaveDefaultSearchProviderToPrefs(const TemplateURL* url,
125 // Returns true if there is no TemplateURL that conflicts with the
131 // a TemplateURL for an existing TemplateURL that shares the same host.
134 TemplateURL** template_url_to_replace);
147 TemplateURL* GetTemplateURLForKeyword(const base::string16& keyword);
149 // Returns that TemplateURL with the specified GUID, or NULL if not found.
152 TemplateURL* GetTemplateURLForGUID(const std::string& sync_guid);
154 // Returns the first TemplateURL found with a URL using the specified |host|,
156 TemplateURL* GetTemplateURLForHost(const std::string& host);
161 bool Add(TemplateURL* template_url);
165 void AddWithOverrides(TemplateURL* template_url,
171 void AddExtensionControlledTURL(TemplateURL* template_url,
174 // Removes the keyword from the model. This deletes the supplied TemplateURL.
176 void Remove(TemplateURL* template_url);
178 // Removes any TemplateURL of type NORMAL_CONTROLLED_BY_EXTENSION associated
180 // TemplateURL in question is the current default search provider.
199 // Adds a TemplateURL for an extension with an omnibox keyword.
206 // Removes the TemplateURL containing the keyword for the extension with the
216 void IncrementUsageCount(TemplateURL* url);
218 // Resets the title, keyword and search url of the specified TemplateURL.
219 // The TemplateURL is marked as not replaceable.
220 void ResetTemplateURL(TemplateURL* url,
228 bool CanMakeDefault(const TemplateURL* url);
233 void SetUserSelectedDefaultSearchProvider(TemplateURL* url);
239 TemplateURL* GetDefaultSearchProvider();
257 TemplateURL* FindNewDefaultSearchProvider();
337 // Processes a local TemplateURL change for Sync. |turl| is the TemplateURL
343 const TemplateURL* turl,
349 // Returns a SearchTermsData which can be used to call TemplateURL methods.
360 const TemplateURL& turl);
362 // Creates a new heap-allocated TemplateURL* which is populated by overlaying
364 // remains unmodified. The caller owns the returned TemplateURL*.
366 // If the created TemplateURL is migrated in some way from out-of-date sync
370 static TemplateURL
372 TemplateURL* existing_turl,
393 virtual void SetKeywordSearchTermsForURL(const TemplateURL* t_url,
416 typedef std::map<base::string16, TemplateURL*> KeywordToTemplateMap;
417 typedef std::map<std::string, TemplateURL*> GUIDToTemplateMap;
454 void RemoveFromMaps(TemplateURL* template_url);
456 void AddToMaps(TemplateURL* template_url);
487 // Returns true if there is no TemplateURL that has a search url with the
491 TemplateURL** to_replace);
493 // Returns true if the TemplateURL is replaceable. This doesn't look at the
495 // checks have been done. This returns true if the TemplateURL doesn't appear
497 bool CanReplace(const TemplateURL* t_url);
500 TemplateURL* FindNonExtensionTemplateURLForKeyword(
511 bool UpdateNoNotify(TemplateURL* existing_turl,
512 const TemplateURL& new_values,
515 // If the TemplateURL comes from a prepopulated URL available in the current
519 static void UpdateTemplateURLIfPrepopulated(TemplateURL* existing_turl,
522 // If the TemplateURL's sync GUID matches the kSyncedDefaultSearchProviderGUID
525 void MaybeUpdateDSEAfterSync(TemplateURL* synced_turl);
531 // For each TemplateURL whose url matches the visited url
537 void AddTabToSearchVisit(const TemplateURL& t_url);
544 // Adds a new TemplateURL to this model. TemplateURLService will own the
545 // reference, and delete it when the TemplateURL is removed.
546 // If |newly_adding| is false, we assume that this TemplateURL was already
554 bool AddNoNotify(TemplateURL* template_url, bool newly_adding);
556 // Removes the keyword from the model. This deletes the supplied TemplateURL.
559 void RemoveNoNotify(TemplateURL* template_url);
563 bool ResetTemplateURLNoNotify(TemplateURL* url,
579 // Resets the sync GUID of the specified TemplateURL and persists the change
581 void ResetTemplateURLGUID(TemplateURL* url, const std::string& guid);
589 base::string16 UniquifyKeyword(const TemplateURL& turl, bool force);
592 // the purposes of resolving conflicts. |local_turl| must be a TemplateURL
594 // is a new TemplateURL known to Sync but not yet known to the local model.
600 bool IsLocalTemplateURLBetter(const TemplateURL* local_turl,
601 const TemplateURL* sync_turl);
607 // or applied as an update to an existing TemplateURL.
611 void ResolveSyncKeywordConflict(TemplateURL* unapplied_sync_turl,
612 TemplateURL* applied_sync_turl,
616 // local TemplateURL to make room for it. This expects |sync_turl| to be a new
629 void MergeInSyncTemplateURL(TemplateURL* sync_turl,
650 // Returns a new TemplateURL for the given extension.
651 TemplateURL* CreateTemplateURLForExtension(
654 // Returns the TemplateURL corresponding to |prepopulated_id|, if any.
655 TemplateURL* FindPrepopulatedTemplateURL(int prepopulated_id);
657 // Returns the TemplateURL associated with |extension_id|, if any.
658 TemplateURL* FindTemplateURLForExtension(const std::string& extension_id,
659 TemplateURL::Type type);
661 // Finds the extension-supplied TemplateURL that matches |data|, if any.
662 TemplateURL* FindMatchingExtensionTemplateURL(const TemplateURLData& data,
663 TemplateURL::Type type);
674 // Mapping from keyword to the TemplateURL.
677 // Mapping from Sync GUIDs to the TemplateURL.
715 // TemplateURL owned by |template_urls_|.
716 TemplateURL* default_search_provider_;
720 scoped_ptr<TemplateURL> initial_default_search_provider_;
725 // ID assigned to next TemplateURL added to this model. This is an ever