OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ |
6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ | 6 #define CHROME_BROWSER_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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 const TemplateURLRef::SearchTermsArgs& search_terms_args, | 728 const TemplateURLRef::SearchTermsArgs& search_terms_args, |
729 bool is_in_query, | 729 bool is_in_query, |
730 std::string* input_encoding, | 730 std::string* input_encoding, |
731 base::string16* encoded_terms, | 731 base::string16* encoded_terms, |
732 base::string16* encoded_original_query) const; | 732 base::string16* encoded_original_query) const; |
733 | 733 |
734 private: | 734 private: |
735 friend class TemplateURLService; | 735 friend class TemplateURLService; |
736 FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ReflectsBookmarkBarPinned); | 736 FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ReflectsBookmarkBarPinned); |
737 | 737 |
738 void CopyFrom(const TemplateURL& other); | 738 void CopyFrom(const TemplateURLData& other); |
739 | 739 |
740 void SetURL(const std::string& url); | 740 void SetURL(const std::string& url); |
741 void SetPrepopulateId(int id); | 741 void SetPrepopulateId(int id); |
742 | 742 |
743 // Resets the keyword if IsGoogleSearchURLWithReplaceableKeyword() or |force|. | 743 // Resets the keyword if IsGoogleSearchURLWithReplaceableKeyword() or |force|. |
744 // The |force| parameter is useful when the existing keyword is known to be | 744 // The |force| parameter is useful when the existing keyword is known to be |
745 // a placeholder. The resulting keyword is generated using | 745 // a placeholder. The resulting keyword is generated using |
746 // TemplateURLService::GenerateSearchURL() and | 746 // TemplateURLService::GenerateSearchURL() and |
747 // TemplateURLService::GenerateKeyword(). | 747 // TemplateURLService::GenerateKeyword(). |
748 void ResetKeywordIfNecessary(bool force); | 748 void ResetKeywordIfNecessary(bool force); |
(...skipping 16 matching lines...) Expand all Loading... |
765 TemplateURLRef image_url_ref_; | 765 TemplateURLRef image_url_ref_; |
766 TemplateURLRef new_tab_url_ref_; | 766 TemplateURLRef new_tab_url_ref_; |
767 scoped_ptr<AssociatedExtensionInfo> extension_info_; | 767 scoped_ptr<AssociatedExtensionInfo> extension_info_; |
768 | 768 |
769 // TODO(sky): Add date last parsed OSD file. | 769 // TODO(sky): Add date last parsed OSD file. |
770 | 770 |
771 DISALLOW_COPY_AND_ASSIGN(TemplateURL); | 771 DISALLOW_COPY_AND_ASSIGN(TemplateURL); |
772 }; | 772 }; |
773 | 773 |
774 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ | 774 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ |
OLD | NEW |