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 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 TemplateURL* FindPrepopulatedTemplateURL(int prepopulated_id); | 689 TemplateURL* FindPrepopulatedTemplateURL(int prepopulated_id); |
690 | 690 |
691 // Returns the TemplateURL associated with |extension_id|, if any. | 691 // Returns the TemplateURL associated with |extension_id|, if any. |
692 TemplateURL* FindTemplateURLForExtension(const std::string& extension_id, | 692 TemplateURL* FindTemplateURLForExtension(const std::string& extension_id, |
693 TemplateURL::Type type); | 693 TemplateURL::Type type); |
694 | 694 |
695 // Finds the extension-supplied TemplateURL that matches |data|, if any. | 695 // Finds the extension-supplied TemplateURL that matches |data|, if any. |
696 TemplateURL* FindMatchingExtensionTemplateURL(const TemplateURLData& data, | 696 TemplateURL* FindMatchingExtensionTemplateURL(const TemplateURLData& data, |
697 TemplateURL::Type type); | 697 TemplateURL::Type type); |
698 | 698 |
699 // Finds the most recently-installed NORMAL_CONTROLLED_BY_EXTENSION engine | |
700 // that supports replacement and wants to be default, if any. Notifies the | |
701 // DefaultSearchManager, which might change the effective default search | |
702 // engine. | |
703 void UpdateExtensionDefaultSearchEngine(); | |
704 | |
705 | |
706 // ---------- Browser state related members --------------------------------- | 699 // ---------- Browser state related members --------------------------------- |
707 PrefService* prefs_; | 700 PrefService* prefs_; |
708 | 701 |
709 std::unique_ptr<SearchTermsData> search_terms_data_; | 702 std::unique_ptr<SearchTermsData> search_terms_data_; |
710 | 703 |
711 // ---------- Dependencies on other components ------------------------------ | 704 // ---------- Dependencies on other components ------------------------------ |
712 // Service used to store entries. | 705 // Service used to store entries. |
713 scoped_refptr<KeywordWebDataService> web_data_service_; | 706 scoped_refptr<KeywordWebDataService> web_data_service_; |
714 | 707 |
715 std::unique_ptr<TemplateURLServiceClient> client_; | 708 std::unique_ptr<TemplateURLServiceClient> client_; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 // Helper class to manage the default search engine. | 814 // Helper class to manage the default search engine. |
822 DefaultSearchManager default_search_manager_; | 815 DefaultSearchManager default_search_manager_; |
823 | 816 |
824 std::unique_ptr<GoogleURLTracker::Subscription> | 817 std::unique_ptr<GoogleURLTracker::Subscription> |
825 google_url_updated_subscription_; | 818 google_url_updated_subscription_; |
826 | 819 |
827 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); | 820 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); |
828 }; | 821 }; |
829 | 822 |
830 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 823 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
OLD | NEW |