Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: components/search_engines/template_url_service.h

Issue 2510803003: Pass RapporService to content/browser/ (Closed)
Patch Set: Applying comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 23 matching lines...) Expand all
34 class GURL; 34 class GURL;
35 class PrefService; 35 class PrefService;
36 class SearchHostToURLsMap; 36 class SearchHostToURLsMap;
37 class SearchTermsData; 37 class SearchTermsData;
38 class TemplateURL; 38 class TemplateURL;
39 class TemplateURLServiceClient; 39 class TemplateURLServiceClient;
40 class TemplateURLServiceObserver; 40 class TemplateURLServiceObserver;
41 struct TemplateURLData; 41 struct TemplateURLData;
42 42
43 namespace rappor { 43 namespace rappor {
44 class RapporService; 44 class RapporServiceImpl;
45 } 45 }
46 46
47 namespace syncer { 47 namespace syncer {
48 class SyncData; 48 class SyncData;
49 class SyncErrorFactory; 49 class SyncErrorFactory;
50 } 50 }
51 51
52 namespace user_prefs { 52 namespace user_prefs {
53 class PrefRegistrySyncable; 53 class PrefRegistrySyncable;
54 } 54 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 GURL url; 102 GURL url;
103 bool is_keyword_transition; 103 bool is_keyword_transition;
104 }; 104 };
105 105
106 TemplateURLService( 106 TemplateURLService(
107 PrefService* prefs, 107 PrefService* prefs,
108 std::unique_ptr<SearchTermsData> search_terms_data, 108 std::unique_ptr<SearchTermsData> search_terms_data,
109 const scoped_refptr<KeywordWebDataService>& web_data_service, 109 const scoped_refptr<KeywordWebDataService>& web_data_service,
110 std::unique_ptr<TemplateURLServiceClient> client, 110 std::unique_ptr<TemplateURLServiceClient> client,
111 GoogleURLTracker* google_url_tracker, 111 GoogleURLTracker* google_url_tracker,
112 rappor::RapporService* rappor_service, 112 rappor::RapporServiceImpl* rappor_service,
113 const base::Closure& dsp_change_callback); 113 const base::Closure& dsp_change_callback);
114 // The following is for testing. 114 // The following is for testing.
115 TemplateURLService(const Initializer* initializers, const int count); 115 TemplateURLService(const Initializer* initializers, const int count);
116 ~TemplateURLService() override; 116 ~TemplateURLService() override;
117 117
118 // Register Profile preferences in |registry|. 118 // Register Profile preferences in |registry|.
119 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 119 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
120 120
121 // Removes any unnecessary characters from a user input keyword. 121 // Removes any unnecessary characters from a user input keyword.
122 // This removes the leading scheme, "www." and any trailing slash. 122 // This removes the leading scheme, "www." and any trailing slash.
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 710
711 // ---------- Dependencies on other components ------------------------------ 711 // ---------- Dependencies on other components ------------------------------
712 // Service used to store entries. 712 // Service used to store entries.
713 scoped_refptr<KeywordWebDataService> web_data_service_; 713 scoped_refptr<KeywordWebDataService> web_data_service_;
714 714
715 std::unique_ptr<TemplateURLServiceClient> client_; 715 std::unique_ptr<TemplateURLServiceClient> client_;
716 716
717 GoogleURLTracker* google_url_tracker_; 717 GoogleURLTracker* google_url_tracker_;
718 718
719 // ---------- Metrics related members --------------------------------------- 719 // ---------- Metrics related members ---------------------------------------
720 rappor::RapporService* rappor_service_; 720 rappor::RapporServiceImpl* rappor_service_;
721 721
722 // This closure is run when the default search provider is set to Google. 722 // This closure is run when the default search provider is set to Google.
723 base::Closure dsp_change_callback_; 723 base::Closure dsp_change_callback_;
724 724
725 725
726 PrefChangeRegistrar pref_change_registrar_; 726 PrefChangeRegistrar pref_change_registrar_;
727 727
728 // Mapping from keyword to the TemplateURL. 728 // Mapping from keyword to the TemplateURL.
729 KeywordToTURLAndMeaningfulLength keyword_to_turl_and_length_; 729 KeywordToTURLAndMeaningfulLength keyword_to_turl_and_length_;
730 730
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 // Helper class to manage the default search engine. 821 // Helper class to manage the default search engine.
822 DefaultSearchManager default_search_manager_; 822 DefaultSearchManager default_search_manager_;
823 823
824 std::unique_ptr<GoogleURLTracker::Subscription> 824 std::unique_ptr<GoogleURLTracker::Subscription>
825 google_url_updated_subscription_; 825 google_url_updated_subscription_;
826 826
827 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); 827 DISALLOW_COPY_AND_ASSIGN(TemplateURLService);
828 }; 828 };
829 829
830 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ 830 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698