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 <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 const char* const keyword; | 80 const char* const keyword; |
81 const char* const url; | 81 const char* const url; |
82 const char* const content; | 82 const char* const content; |
83 }; | 83 }; |
84 | 84 |
85 struct URLVisitedDetails { | 85 struct URLVisitedDetails { |
86 GURL url; | 86 GURL url; |
87 bool is_keyword_transition; | 87 bool is_keyword_transition; |
88 }; | 88 }; |
89 | 89 |
90 TemplateURLService(PrefService* prefs, | 90 TemplateURLService( |
91 scoped_ptr<SearchTermsData> search_terms_data, | 91 PrefService* prefs, |
92 KeywordWebDataService* web_data_service, | 92 scoped_ptr<SearchTermsData> search_terms_data, |
93 scoped_ptr<TemplateURLServiceClient> client, | 93 const scoped_refptr<KeywordWebDataService>& web_data_service, |
94 GoogleURLTracker* google_url_tracker, | 94 scoped_ptr<TemplateURLServiceClient> client, |
95 rappor::RapporService* rappor_service, | 95 GoogleURLTracker* google_url_tracker, |
96 const base::Closure& dsp_change_callback); | 96 rappor::RapporService* rappor_service, |
| 97 const base::Closure& dsp_change_callback); |
97 // The following is for testing. | 98 // The following is for testing. |
98 TemplateURLService(const Initializer* initializers, const int count); | 99 TemplateURLService(const Initializer* initializers, const int count); |
99 virtual ~TemplateURLService(); | 100 virtual ~TemplateURLService(); |
100 | 101 |
101 // Creates a TemplateURLData that was previously saved to |prefs| via | 102 // Creates a TemplateURLData that was previously saved to |prefs| via |
102 // SaveDefaultSearchProviderToPrefs or set via policy. | 103 // SaveDefaultSearchProviderToPrefs or set via policy. |
103 // Returns true if successful, false otherwise. | 104 // Returns true if successful, false otherwise. |
104 // If the user or the policy has opted for no default search, this | 105 // If the user or the policy has opted for no default search, this |
105 // returns true but default_provider is set to NULL. | 106 // returns true but default_provider is set to NULL. |
106 // |*is_managed| specifies whether the default is managed via policy. | 107 // |*is_managed| specifies whether the default is managed via policy. |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 | 751 |
751 // Helper class to manage the default search engine. | 752 // Helper class to manage the default search engine. |
752 DefaultSearchManager default_search_manager_; | 753 DefaultSearchManager default_search_manager_; |
753 | 754 |
754 scoped_ptr<GoogleURLTracker::Subscription> google_url_updated_subscription_; | 755 scoped_ptr<GoogleURLTracker::Subscription> google_url_updated_subscription_; |
755 | 756 |
756 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); | 757 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); |
757 }; | 758 }; |
758 | 759 |
759 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 760 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
OLD | NEW |