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

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

Issue 2354413004: Delete from Sync the artificial search engines created by the omnibox extensions. (Closed)
Patch Set: IsOmniboxExtensionURL Created 4 years, 2 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_H_ 5 #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ 6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 return suggestions_url_ref_; 606 return suggestions_url_ref_;
607 } 607 }
608 const TemplateURLRef& instant_url_ref() const { return instant_url_ref_; } 608 const TemplateURLRef& instant_url_ref() const { return instant_url_ref_; }
609 const TemplateURLRef& image_url_ref() const { return image_url_ref_; } 609 const TemplateURLRef& image_url_ref() const { return image_url_ref_; }
610 const TemplateURLRef& new_tab_url_ref() const { return new_tab_url_ref_; } 610 const TemplateURLRef& new_tab_url_ref() const { return new_tab_url_ref_; }
611 const TemplateURLRef& contextual_search_url_ref() const { 611 const TemplateURLRef& contextual_search_url_ref() const {
612 return contextual_search_url_ref_; 612 return contextual_search_url_ref_;
613 } 613 }
614 614
615 Type type() const { return type_; } 615 Type type() const { return type_; }
616 // TODO(ianwen): remove set_type() once RestoreExtensionInfoIfNecessary() no
617 // longer needs it.
618 void set_type(Type type) { type_ = type; }
619 616
620 // This setter shouldn't be used except by TemplateURLService and 617 // This setter shouldn't be used except by TemplateURLService and
621 // TemplateURLServiceClient implementations. 618 // TemplateURLServiceClient implementations.
622 void set_extension_info( 619 void set_extension_info(
623 std::unique_ptr<AssociatedExtensionInfo> extension_info) { 620 std::unique_ptr<AssociatedExtensionInfo> extension_info) {
624 extension_info_ = std::move(extension_info); 621 extension_info_ = std::move(extension_info);
625 } 622 }
626 623
627 // Returns true if |url| supports replacement. 624 // Returns true if |url| supports replacement.
628 bool SupportsReplacement(const SearchTermsData& search_terms_data) const; 625 bool SupportsReplacement(const SearchTermsData& search_terms_data) const;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 // URL. 747 // URL.
751 TemplateURLRef* url_ref_; 748 TemplateURLRef* url_ref_;
752 749
753 TemplateURLRef suggestions_url_ref_; 750 TemplateURLRef suggestions_url_ref_;
754 TemplateURLRef instant_url_ref_; 751 TemplateURLRef instant_url_ref_;
755 TemplateURLRef image_url_ref_; 752 TemplateURLRef image_url_ref_;
756 TemplateURLRef new_tab_url_ref_; 753 TemplateURLRef new_tab_url_ref_;
757 TemplateURLRef contextual_search_url_ref_; 754 TemplateURLRef contextual_search_url_ref_;
758 std::unique_ptr<AssociatedExtensionInfo> extension_info_; 755 std::unique_ptr<AssociatedExtensionInfo> extension_info_;
759 756
760 Type type_; 757 Type type_;
Peter Kasting 2016/10/05 00:15:20 Nit: Can now be const?
vasilii 2016/10/05 12:03:48 Done.
761 758
762 // Caches the computed engine type across successive calls to GetEngineType(). 759 // Caches the computed engine type across successive calls to GetEngineType().
763 mutable SearchEngineType engine_type_; 760 mutable SearchEngineType engine_type_;
764 761
765 // TODO(sky): Add date last parsed OSD file. 762 // TODO(sky): Add date last parsed OSD file.
766 763
767 DISALLOW_COPY_AND_ASSIGN(TemplateURL); 764 DISALLOW_COPY_AND_ASSIGN(TemplateURL);
768 }; 765 };
769 766
770 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ 767 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698