| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_TEMPLATE_URL_H__ | 5 #ifndef CHROME_BROWSER_TEMPLATE_URL_H__ |
| 6 #define CHROME_BROWSER_TEMPLATE_URL_H__ | 6 #define CHROME_BROWSER_TEMPLATE_URL_H__ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // Returns true if this URL supports replacement. | 56 // Returns true if this URL supports replacement. |
| 57 bool SupportsReplacement() const; | 57 bool SupportsReplacement() const; |
| 58 | 58 |
| 59 // Returns a string that is the result of replacing the search terms in | 59 // Returns a string that is the result of replacing the search terms in |
| 60 // the url with the specified value. | 60 // the url with the specified value. |
| 61 // | 61 // |
| 62 // If this TemplateURLRef does not support replacement (SupportsReplacement | 62 // If this TemplateURLRef does not support replacement (SupportsReplacement |
| 63 // returns false), an empty string is returned. | 63 // returns false), an empty string is returned. |
| 64 // | 64 // |
| 65 // The TemplateURL is used to determine the input encoding for the term. | 65 // The TemplateURL is used to determine the input encoding for the term. |
| 66 GURL ReplaceSearchTerms( | 66 std::wstring ReplaceSearchTerms( |
| 67 const TemplateURL& host, | 67 const TemplateURL& host, |
| 68 const std::wstring& terms, | 68 const std::wstring& terms, |
| 69 int accepted_suggestion, | 69 int accepted_suggestion, |
| 70 const std::wstring& original_query_for_suggestion) const; | 70 const std::wstring& original_query_for_suggestion) const; |
| 71 | 71 |
| 72 // Returns the raw URL. None of the parameters will have been replaced. | 72 // Returns the raw URL. None of the parameters will have been replaced. |
| 73 const std::wstring& url() const { return url_; } | 73 const std::wstring& url() const { return url_; } |
| 74 | 74 |
| 75 // Returns the index number of the first search result. | 75 // Returns the index number of the first search result. |
| 76 int index_offset() const { return index_offset_; } | 76 int index_offset() const { return index_offset_; } |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 std::vector<std::string> input_encodings_; | 434 std::vector<std::string> input_encodings_; |
| 435 IDType id_; | 435 IDType id_; |
| 436 base::Time date_created_; | 436 base::Time date_created_; |
| 437 int usage_count_; | 437 int usage_count_; |
| 438 int prepopulate_id_; | 438 int prepopulate_id_; |
| 439 | 439 |
| 440 // TODO(sky): Add date last parsed OSD file. | 440 // TODO(sky): Add date last parsed OSD file. |
| 441 }; | 441 }; |
| 442 | 442 |
| 443 #endif // CHROME_BROWSER_TEMPLATE_URL_PARSER_H__ | 443 #endif // CHROME_BROWSER_TEMPLATE_URL_PARSER_H__ |
| OLD | NEW |