| 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 | |
| 718 // ---------- Browser state related members --------------------------------- | 711 // ---------- Browser state related members --------------------------------- |
| 719 PrefService* prefs_; | 712 PrefService* prefs_; |
| 720 | 713 |
| 721 std::unique_ptr<SearchTermsData> search_terms_data_; | 714 std::unique_ptr<SearchTermsData> search_terms_data_; |
| 722 | 715 |
| 723 // ---------- Dependencies on other components ------------------------------ | 716 // ---------- Dependencies on other components ------------------------------ |
| 724 // Service used to store entries. | 717 // Service used to store entries. |
| 725 scoped_refptr<KeywordWebDataService> web_data_service_; | 718 scoped_refptr<KeywordWebDataService> web_data_service_; |
| 726 | 719 |
| 727 std::unique_ptr<TemplateURLServiceClient> client_; | 720 std::unique_ptr<TemplateURLServiceClient> client_; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 // Helper class to manage the default search engine. | 826 // Helper class to manage the default search engine. |
| 834 DefaultSearchManager default_search_manager_; | 827 DefaultSearchManager default_search_manager_; |
| 835 | 828 |
| 836 std::unique_ptr<GoogleURLTracker::Subscription> | 829 std::unique_ptr<GoogleURLTracker::Subscription> |
| 837 google_url_updated_subscription_; | 830 google_url_updated_subscription_; |
| 838 | 831 |
| 839 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); | 832 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); |
| 840 }; | 833 }; |
| 841 | 834 |
| 842 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 835 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
| OLD | NEW |