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

Unified Diff: components/search_engines/keyword_table.cc

Issue 684493002: Don't persist and sync omnibox extension keywords. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 6 years, 1 month 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
« no previous file with comments | « components/search_engines/keyword_table.h ('k') | components/search_engines/search_host_to_urls_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/search_engines/keyword_table.cc
diff --git a/components/search_engines/keyword_table.cc b/components/search_engines/keyword_table.cc
index 447ebfbeba81bbad79392c66f990772d6e7800f4..08dea926567ef34ed5ee773bd6cd5d182d854ed1 100644
--- a/components/search_engines/keyword_table.cc
+++ b/components/search_engines/keyword_table.cc
@@ -235,6 +235,9 @@ bool KeywordTable::MigrateToVersion(int version,
case 53:
*update_compatible_version = true;
return MigrateToVersion53AddNewTabURLColumn();
+ case 59:
+ *update_compatible_version = true;
+ return MigrateToVersion59RemoveExtensionKeywords();
}
return true;
@@ -451,6 +454,11 @@ bool KeywordTable::MigrateToVersion53AddNewTabURLColumn() {
"VARCHAR DEFAULT ''");
}
+bool KeywordTable::MigrateToVersion59RemoveExtensionKeywords() {
+ return db_->Execute("DELETE FROM keywords "
+ "WHERE url LIKE 'chrome-extension://%'");
+}
+
// static
bool KeywordTable::GetKeywordDataFromStatement(const sql::Statement& s,
TemplateURLData* data) {
« no previous file with comments | « components/search_engines/keyword_table.h ('k') | components/search_engines/search_host_to_urls_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698