| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 5 #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
| 6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 bool supports_replacement_only, | 698 bool supports_replacement_only, |
| 699 TURLsAndMeaningfulLengths* matches); | 699 TURLsAndMeaningfulLengths* matches); |
| 700 | 700 |
| 701 // Returns the TemplateURL corresponding to |prepopulated_id|, if any. | 701 // Returns the TemplateURL corresponding to |prepopulated_id|, if any. |
| 702 TemplateURL* FindPrepopulatedTemplateURL(int prepopulated_id); | 702 TemplateURL* FindPrepopulatedTemplateURL(int prepopulated_id); |
| 703 | 703 |
| 704 // Returns the TemplateURL associated with |extension_id|, if any. | 704 // Returns the TemplateURL associated with |extension_id|, if any. |
| 705 TemplateURL* FindTemplateURLForExtension(const std::string& extension_id, | 705 TemplateURL* FindTemplateURLForExtension(const std::string& extension_id, |
| 706 TemplateURL::Type type); | 706 TemplateURL::Type type); |
| 707 | 707 |
| 708 // Finds the extension-supplied TemplateURL that matches |data|, if any. | 708 // Returns the extension-supplied TemplateURL that is currently is set as |
| 709 TemplateURL* FindMatchingExtensionTemplateURL(const TemplateURLData& data, | 709 // default. |
| 710 TemplateURL::Type type); | 710 TemplateURL* GetExtensionControlledDefaultTemplateURL(); |
| 711 | |
| 712 // Finds the most recently-installed NORMAL_CONTROLLED_BY_EXTENSION engine | |
| 713 // that supports replacement and wants to be default, if any. Notifies the | |
| 714 // DefaultSearchManager, which might change the effective default search | |
| 715 // engine. | |
| 716 void UpdateExtensionDefaultSearchEngine(); | |
| 717 | |
| 718 | 711 |
| 719 // ---------- Browser state related members --------------------------------- | 712 // ---------- Browser state related members --------------------------------- |
| 720 PrefService* prefs_; | 713 PrefService* prefs_; |
| 721 | 714 |
| 722 std::unique_ptr<SearchTermsData> search_terms_data_; | 715 std::unique_ptr<SearchTermsData> search_terms_data_; |
| 723 | 716 |
| 724 // ---------- Dependencies on other components ------------------------------ | 717 // ---------- Dependencies on other components ------------------------------ |
| 725 // Service used to store entries. | 718 // Service used to store entries. |
| 726 scoped_refptr<KeywordWebDataService> web_data_service_; | 719 scoped_refptr<KeywordWebDataService> web_data_service_; |
| 727 | 720 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 // Helper class to manage the default search engine. | 827 // Helper class to manage the default search engine. |
| 835 DefaultSearchManager default_search_manager_; | 828 DefaultSearchManager default_search_manager_; |
| 836 | 829 |
| 837 std::unique_ptr<GoogleURLTracker::Subscription> | 830 std::unique_ptr<GoogleURLTracker::Subscription> |
| 838 google_url_updated_subscription_; | 831 google_url_updated_subscription_; |
| 839 | 832 |
| 840 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); | 833 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); |
| 841 }; | 834 }; |
| 842 | 835 |
| 843 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 836 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
| OLD | NEW |