| 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_DATA_H_ | 5 #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_DATA_H_ |
| 6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_DATA_H_ | 6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_DATA_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // The raw URL for the TemplateURL, which may not be valid as-is (e.g. because | 32 // The raw URL for the TemplateURL, which may not be valid as-is (e.g. because |
| 33 // it requires substitutions first). This must be non-empty. | 33 // it requires substitutions first). This must be non-empty. |
| 34 void SetURL(const std::string& url); | 34 void SetURL(const std::string& url); |
| 35 const std::string& url() const { return url_; } | 35 const std::string& url() const { return url_; } |
| 36 | 36 |
| 37 // Optional additional raw URLs. | 37 // Optional additional raw URLs. |
| 38 std::string suggestions_url; | 38 std::string suggestions_url; |
| 39 std::string instant_url; | 39 std::string instant_url; |
| 40 std::string image_url; | 40 std::string image_url; |
| 41 std::string new_tab_url; | 41 std::string new_tab_url; |
| 42 std::string contextual_search_url; |
| 42 | 43 |
| 43 // The following post_params are comma-separated lists used to specify the | 44 // The following post_params are comma-separated lists used to specify the |
| 44 // post parameters for the corresponding URL. | 45 // post parameters for the corresponding URL. |
| 45 std::string search_url_post_params; | 46 std::string search_url_post_params; |
| 46 std::string suggestions_url_post_params; | 47 std::string suggestions_url_post_params; |
| 47 std::string instant_url_post_params; | 48 std::string instant_url_post_params; |
| 48 std::string image_url_post_params; | 49 std::string image_url_post_params; |
| 49 | 50 |
| 50 // Optional favicon for the TemplateURL. | 51 // Optional favicon for the TemplateURL. |
| 51 GURL favicon_url; | 52 GURL favicon_url; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 std::string search_terms_replacement_key; | 113 std::string search_terms_replacement_key; |
| 113 | 114 |
| 114 private: | 115 private: |
| 115 // Private so we can enforce using the setters and thus enforce that these | 116 // Private so we can enforce using the setters and thus enforce that these |
| 116 // fields are never empty. | 117 // fields are never empty. |
| 117 base::string16 keyword_; | 118 base::string16 keyword_; |
| 118 std::string url_; | 119 std::string url_; |
| 119 }; | 120 }; |
| 120 | 121 |
| 121 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_DATA_H_ | 122 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_DATA_H_ |
| OLD | NEW |