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 <string> | 10 #include <string> |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 const TemplateURLRef& instant_url_ref() const { return instant_url_ref_; } | 612 const TemplateURLRef& instant_url_ref() const { return instant_url_ref_; } |
613 const TemplateURLRef& image_url_ref() const { return image_url_ref_; } | 613 const TemplateURLRef& image_url_ref() const { return image_url_ref_; } |
614 const TemplateURLRef& new_tab_url_ref() const { return new_tab_url_ref_; } | 614 const TemplateURLRef& new_tab_url_ref() const { return new_tab_url_ref_; } |
615 const TemplateURLRef& contextual_search_url_ref() const { | 615 const TemplateURLRef& contextual_search_url_ref() const { |
616 return contextual_search_url_ref_; | 616 return contextual_search_url_ref_; |
617 } | 617 } |
618 | 618 |
619 // This setter shouldn't be used except by TemplateURLService and | 619 // This setter shouldn't be used except by TemplateURLService and |
620 // TemplateURLServiceClient implementations. | 620 // TemplateURLServiceClient implementations. |
621 void set_extension_info(scoped_ptr<AssociatedExtensionInfo> extension_info) { | 621 void set_extension_info(scoped_ptr<AssociatedExtensionInfo> extension_info) { |
622 extension_info_ = extension_info.Pass(); | 622 extension_info_ = std::move(extension_info); |
623 } | 623 } |
624 | 624 |
625 // Returns true if |url| supports replacement. | 625 // Returns true if |url| supports replacement. |
626 bool SupportsReplacement(const SearchTermsData& search_terms_data) const; | 626 bool SupportsReplacement(const SearchTermsData& search_terms_data) const; |
627 | 627 |
628 // Returns true if any URLRefs use Googe base URLs. | 628 // Returns true if any URLRefs use Googe base URLs. |
629 bool HasGoogleBaseURLs(const SearchTermsData& search_terms_data) const; | 629 bool HasGoogleBaseURLs(const SearchTermsData& search_terms_data) const; |
630 | 630 |
631 // Returns true if this TemplateURL uses Google base URLs and has a keyword | 631 // Returns true if this TemplateURL uses Google base URLs and has a keyword |
632 // of "google.TLD". We use this to decide whether we can automatically | 632 // of "google.TLD". We use this to decide whether we can automatically |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 TemplateURLRef new_tab_url_ref_; | 746 TemplateURLRef new_tab_url_ref_; |
747 TemplateURLRef contextual_search_url_ref_; | 747 TemplateURLRef contextual_search_url_ref_; |
748 scoped_ptr<AssociatedExtensionInfo> extension_info_; | 748 scoped_ptr<AssociatedExtensionInfo> extension_info_; |
749 | 749 |
750 // TODO(sky): Add date last parsed OSD file. | 750 // TODO(sky): Add date last parsed OSD file. |
751 | 751 |
752 DISALLOW_COPY_AND_ASSIGN(TemplateURL); | 752 DISALLOW_COPY_AND_ASSIGN(TemplateURL); |
753 }; | 753 }; |
754 | 754 |
755 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ | 755 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ |
OLD | NEW |