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

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

Issue 2639153002: Make extensions DSE persistent in browser prefs (Reland) (Closed)
Patch Set: Rebased and updated after review, use new keyword conflicts resolution Created 3 years, 9 months 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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 718
719 // Returns the TemplateURL associated with |extension_id|, if any. 719 // Returns the TemplateURL associated with |extension_id|, if any.
720 TemplateURL* FindTemplateURLForExtension(const std::string& extension_id, 720 TemplateURL* FindTemplateURLForExtension(const std::string& extension_id,
721 TemplateURL::Type type); 721 TemplateURL::Type type);
722 722
723 // Finds any NORMAL_CONTROLLED_BY_EXTENSION engine that matches |data| and 723 // Finds any NORMAL_CONTROLLED_BY_EXTENSION engine that matches |data| and
724 // wants to be default. Returns nullptr if not found. 724 // wants to be default. Returns nullptr if not found.
725 TemplateURL* FindMatchingDefaultExtensionTemplateURL( 725 TemplateURL* FindMatchingDefaultExtensionTemplateURL(
726 const TemplateURLData& data); 726 const TemplateURLData& data);
727 727
728 // Finds the most recently-installed NORMAL_CONTROLLED_BY_EXTENSION engine
729 // that supports replacement and wants to be default, if any. Notifies the
730 // DefaultSearchManager, which might change the effective default search
731 // engine.
732 void UpdateExtensionDefaultSearchEngine();
733
734
735 // ---------- Browser state related members --------------------------------- 728 // ---------- Browser state related members ---------------------------------
736 PrefService* prefs_; 729 PrefService* prefs_;
737 730
738 std::unique_ptr<SearchTermsData> search_terms_data_; 731 std::unique_ptr<SearchTermsData> search_terms_data_;
739 732
740 // ---------- Dependencies on other components ------------------------------ 733 // ---------- Dependencies on other components ------------------------------
741 // Service used to store entries. 734 // Service used to store entries.
742 scoped_refptr<KeywordWebDataService> web_data_service_; 735 scoped_refptr<KeywordWebDataService> web_data_service_;
743 736
744 std::unique_ptr<TemplateURLServiceClient> client_; 737 std::unique_ptr<TemplateURLServiceClient> client_;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 // Helper class to manage the default search engine. 843 // Helper class to manage the default search engine.
851 DefaultSearchManager default_search_manager_; 844 DefaultSearchManager default_search_manager_;
852 845
853 std::unique_ptr<GoogleURLTracker::Subscription> 846 std::unique_ptr<GoogleURLTracker::Subscription>
854 google_url_updated_subscription_; 847 google_url_updated_subscription_;
855 848
856 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); 849 DISALLOW_COPY_AND_ASSIGN(TemplateURLService);
857 }; 850 };
858 851
859 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ 852 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698