| Index: components/search_engines/template_url_data.cc
|
| diff --git a/components/search_engines/template_url_data.cc b/components/search_engines/template_url_data.cc
|
| index fdbec7d7c00b05258e5274cf31096650d966d2d4..8013697e1286b288477d500ac6cc0a2ae07da5fe 100644
|
| --- a/components/search_engines/template_url_data.cc
|
| +++ b/components/search_engines/template_url_data.cc
|
| @@ -7,6 +7,7 @@
|
| #include "base/guid.h"
|
| #include "base/i18n/case_conversion.h"
|
| #include "base/logging.h"
|
| +#include "base/strings/string_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
|
|
| TemplateURLData::TemplateURLData()
|
| @@ -26,6 +27,14 @@ TemplateURLData::TemplateURLData()
|
| TemplateURLData::~TemplateURLData() {
|
| }
|
|
|
| +void TemplateURLData::SetShortName(const base::string16& short_name) {
|
| + DCHECK(!short_name.empty());
|
| +
|
| + // Remove tabs, carriage returns, and the like, as they can corrupt
|
| + // how the short name is displayed.
|
| + short_name_ = base::CollapseWhitespace(short_name, true);
|
| +}
|
| +
|
| void TemplateURLData::SetKeyword(const base::string16& keyword) {
|
| DCHECK(!keyword.empty());
|
|
|
|
|