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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 TemplateURL* FindPrepopulatedTemplateURL(int prepopulated_id); | 701 TemplateURL* FindPrepopulatedTemplateURL(int prepopulated_id); |
702 | 702 |
703 // Returns the TemplateURL associated with |extension_id|, if any. | 703 // Returns the TemplateURL associated with |extension_id|, if any. |
704 TemplateURL* FindTemplateURLForExtension(const std::string& extension_id, | 704 TemplateURL* FindTemplateURLForExtension(const std::string& extension_id, |
705 TemplateURL::Type type); | 705 TemplateURL::Type type); |
706 | 706 |
707 // Finds the extension-supplied TemplateURL that matches |data|, if any. | 707 // Finds the extension-supplied TemplateURL that matches |data|, if any. |
708 TemplateURL* FindMatchingExtensionTemplateURL(const TemplateURLData& data, | 708 TemplateURL* FindMatchingExtensionTemplateURL(const TemplateURLData& data, |
709 TemplateURL::Type type); | 709 TemplateURL::Type type); |
710 | 710 |
| 711 // Finds the most recently-installed NORMAL_CONTROLLED_BY_EXTENSION engine |
| 712 // that supports replacement and wants to be default, if any. Notifies the |
| 713 // DefaultSearchManager, which might change the effective default search |
| 714 // engine. |
| 715 void UpdateExtensionDefaultSearchEngine(); |
| 716 |
| 717 |
711 // ---------- Browser state related members --------------------------------- | 718 // ---------- Browser state related members --------------------------------- |
712 PrefService* prefs_; | 719 PrefService* prefs_; |
713 | 720 |
714 std::unique_ptr<SearchTermsData> search_terms_data_; | 721 std::unique_ptr<SearchTermsData> search_terms_data_; |
715 | 722 |
716 // ---------- Dependencies on other components ------------------------------ | 723 // ---------- Dependencies on other components ------------------------------ |
717 // Service used to store entries. | 724 // Service used to store entries. |
718 scoped_refptr<KeywordWebDataService> web_data_service_; | 725 scoped_refptr<KeywordWebDataService> web_data_service_; |
719 | 726 |
720 std::unique_ptr<TemplateURLServiceClient> client_; | 727 std::unique_ptr<TemplateURLServiceClient> client_; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 // Helper class to manage the default search engine. | 833 // Helper class to manage the default search engine. |
827 DefaultSearchManager default_search_manager_; | 834 DefaultSearchManager default_search_manager_; |
828 | 835 |
829 std::unique_ptr<GoogleURLTracker::Subscription> | 836 std::unique_ptr<GoogleURLTracker::Subscription> |
830 google_url_updated_subscription_; | 837 google_url_updated_subscription_; |
831 | 838 |
832 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); | 839 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); |
833 }; | 840 }; |
834 | 841 |
835 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 842 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
OLD | NEW |