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_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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 const std::string& image_url_post_params() const { | 564 const std::string& image_url_post_params() const { |
565 return data_.image_url_post_params; | 565 return data_.image_url_post_params; |
566 } | 566 } |
567 const std::vector<std::string>& alternate_urls() const { | 567 const std::vector<std::string>& alternate_urls() const { |
568 return data_.alternate_urls; | 568 return data_.alternate_urls; |
569 } | 569 } |
570 const GURL& favicon_url() const { return data_.favicon_url; } | 570 const GURL& favicon_url() const { return data_.favicon_url; } |
571 | 571 |
572 const GURL& originating_url() const { return data_.originating_url; } | 572 const GURL& originating_url() const { return data_.originating_url; } |
573 | 573 |
574 bool show_in_default_list() const { return data_.show_in_default_list; } | |
575 // Returns true if show_in_default_list() is true and this TemplateURL has a | |
576 // TemplateURLRef that supports replacement. | |
577 bool ShowInDefaultList(const SearchTermsData& search_terms_data) const; | |
578 | |
579 bool safe_for_autoreplace() const { return data_.safe_for_autoreplace; } | 574 bool safe_for_autoreplace() const { return data_.safe_for_autoreplace; } |
580 | 575 |
581 const std::vector<std::string>& input_encodings() const { | 576 const std::vector<std::string>& input_encodings() const { |
582 return data_.input_encodings; | 577 return data_.input_encodings; |
583 } | 578 } |
584 | 579 |
585 TemplateURLID id() const { return data_.id; } | 580 TemplateURLID id() const { return data_.id; } |
586 | 581 |
587 base::Time date_created() const { return data_.date_created; } | 582 base::Time date_created() const { return data_.date_created; } |
588 base::Time last_modified() const { return data_.last_modified; } | 583 base::Time last_modified() const { return data_.last_modified; } |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 | 753 |
759 // Caches the computed engine type across successive calls to GetEngineType(). | 754 // Caches the computed engine type across successive calls to GetEngineType(). |
760 mutable SearchEngineType engine_type_; | 755 mutable SearchEngineType engine_type_; |
761 | 756 |
762 // TODO(sky): Add date last parsed OSD file. | 757 // TODO(sky): Add date last parsed OSD file. |
763 | 758 |
764 DISALLOW_COPY_AND_ASSIGN(TemplateURL); | 759 DISALLOW_COPY_AND_ASSIGN(TemplateURL); |
765 }; | 760 }; |
766 | 761 |
767 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ | 762 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ |
OLD | NEW |