Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Unified Diff: components/search_engines/keyword_table.cc

Issue 1135163002: Omnibox - Strip Extra Whitespace from Custom Search Engine Names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more tests that don't set short_name Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/search_engines/keyword_table.cc
diff --git a/components/search_engines/keyword_table.cc b/components/search_engines/keyword_table.cc
index 59dff732bdc2f88be61f53249dfc8d46c47e0e9f..3e21c1f91ec5aac6a28c3379adb3797614d3542b 100644
--- a/components/search_engines/keyword_table.cc
+++ b/components/search_engines/keyword_table.cc
@@ -103,7 +103,7 @@ void BindURLToStatement(const TemplateURLData& data,
base::JSONWriter::Write(&alternate_urls_value, &alternate_urls);
s->BindInt64(id_column, data.id);
- s->BindString16(starting_column, data.short_name);
+ s->BindString16(starting_column, data.short_name());
s->BindString16(starting_column + 1, data.keyword());
s->BindString(starting_column + 2, data.favicon_url.is_valid() ?
history::URLDatabase::GURLToDatabaseURL(data.favicon_url) :
@@ -291,7 +291,7 @@ bool KeywordTable::GetKeywordDataFromStatement(const sql::Statement& s,
TemplateURLData* data) {
DCHECK(data);
- data->short_name = s.ColumnString16(1);
+ data->SetShortName(s.ColumnString16(1));
data->SetKeyword(s.ColumnString16(2));
// Due to past bugs, we might have persisted entries with empty URLs. Avoid
// reading these out. (GetKeywords() will delete these entries on return.)
« no previous file with comments | « components/search_engines/default_search_manager_unittest.cc ('k') | components/search_engines/keyword_table_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698