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 <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 static GURL GenerateFaviconURL(const GURL& url); | 529 static GURL GenerateFaviconURL(const GURL& url); |
530 | 530 |
531 // Returns true if |t_url| and |data| are equal in all meaningful respects. | 531 // Returns true if |t_url| and |data| are equal in all meaningful respects. |
532 // Static to allow either or both params to be NULL. | 532 // Static to allow either or both params to be NULL. |
533 static bool MatchesData(const TemplateURL* t_url, | 533 static bool MatchesData(const TemplateURL* t_url, |
534 const TemplateURLData* data, | 534 const TemplateURLData* data, |
535 const SearchTermsData& search_terms_data); | 535 const SearchTermsData& search_terms_data); |
536 | 536 |
537 const TemplateURLData& data() const { return data_; } | 537 const TemplateURLData& data() const { return data_; } |
538 | 538 |
539 const base::string16& short_name() const { return data_.short_name; } | 539 const base::string16& short_name() const { return data_.short_name(); } |
540 // An accessor for the short_name, but adjusted so it can be appropriately | 540 // An accessor for the short_name, but adjusted so it can be appropriately |
541 // displayed even if it is LTR and the UI is RTL. | 541 // displayed even if it is LTR and the UI is RTL. |
542 base::string16 AdjustedShortNameForLocaleDirection() const; | 542 base::string16 AdjustedShortNameForLocaleDirection() const; |
543 | 543 |
544 const base::string16& keyword() const { return data_.keyword(); } | 544 const base::string16& keyword() const { return data_.keyword(); } |
545 | 545 |
546 const std::string& url() const { return data_.url(); } | 546 const std::string& url() const { return data_.url(); } |
547 const std::string& suggestions_url() const { return data_.suggestions_url; } | 547 const std::string& suggestions_url() const { return data_.suggestions_url; } |
548 const std::string& instant_url() const { return data_.instant_url; } | 548 const std::string& instant_url() const { return data_.instant_url; } |
549 const std::string& image_url() const { return data_.image_url; } | 549 const std::string& image_url() const { return data_.image_url; } |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 TemplateURLRef new_tab_url_ref_; | 739 TemplateURLRef new_tab_url_ref_; |
740 TemplateURLRef contextual_search_url_ref_; | 740 TemplateURLRef contextual_search_url_ref_; |
741 scoped_ptr<AssociatedExtensionInfo> extension_info_; | 741 scoped_ptr<AssociatedExtensionInfo> extension_info_; |
742 | 742 |
743 // TODO(sky): Add date last parsed OSD file. | 743 // TODO(sky): Add date last parsed OSD file. |
744 | 744 |
745 DISALLOW_COPY_AND_ASSIGN(TemplateURL); | 745 DISALLOW_COPY_AND_ASSIGN(TemplateURL); |
746 }; | 746 }; |
747 | 747 |
748 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ | 748 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ |
OLD | NEW |