diff options
Diffstat (limited to 'chrome/browser/template_url.cc')
-rw-r--r-- | chrome/browser/template_url.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/template_url.cc b/chrome/browser/template_url.cc index 8a04218..c214db8 100644 --- a/chrome/browser/template_url.cc +++ b/chrome/browser/template_url.cc @@ -11,6 +11,7 @@ #include "chrome/browser/google_url_tracker.h" #include "chrome/browser/template_url_model.h" #include "chrome/common/gfx/favicon_size.h" +#include "chrome/common/l10n_util.h" #include "net/base/escape.h" // The TemplateURLRef has any number of terms that need to be replaced. Each of @@ -503,6 +504,13 @@ void TemplateURL::SetURL(const std::wstring& url, url_.Set(url, index_offset, page_offset); } +void TemplateURL::set_keyword(const std::wstring& keyword) { + // Case sensitive keyword matching is confusing. As such, we force all + // keywords to be lower case. + keyword_ = l10n_util::ToLower(keyword); + autogenerate_keyword_ = false; +} + const std::wstring& TemplateURL::keyword() const { if (autogenerate_keyword_ && keyword_.empty()) { // Generate a keyword and cache it. |