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

Unified Diff: chrome/browser/webdata/web_data_service.cc

Issue 10381016: Remove the "autogenerate keyword" bit on TemplateURL. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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: chrome/browser/webdata/web_data_service.cc
===================================================================
--- chrome/browser/webdata/web_data_service.cc (revision 135424)
+++ chrome/browser/webdata/web_data_service.cc (working copy)
@@ -147,12 +147,10 @@
//
//////////////////////////////////////////////////////////////////////////////
-void WebDataService::AddKeyword(const TemplateURL& url) {
- // Ensure that the keyword is already generated (and cached) before caching
- // the TemplateURL for use on another keyword.
- url.EnsureKeyword();
- GenericRequest<TemplateURL>* request =
- new GenericRequest<TemplateURL>(this, GetNextRequestHandle(), NULL, url);
+void WebDataService::AddKeyword(const TemplateURLData& data) {
+ GenericRequest<TemplateURLData>* request =
+ new GenericRequest<TemplateURLData>(this, GetNextRequestHandle(), NULL,
+ data);
RegisterRequest(request);
ScheduleTask(FROM_HERE, Bind(&WebDataService::AddKeywordImpl, this, request));
}
@@ -165,12 +163,10 @@
Bind(&WebDataService::RemoveKeywordImpl, this, request));
}
-void WebDataService::UpdateKeyword(const TemplateURL& url) {
- // Ensure that the keyword is already generated (and cached) before caching
- // the TemplateURL for use on another keyword.
- url.EnsureKeyword();
- GenericRequest<TemplateURL>* request =
- new GenericRequest<TemplateURL>(this, GetNextRequestHandle(), NULL, url);
+void WebDataService::UpdateKeyword(const TemplateURLData& data) {
+ GenericRequest<TemplateURLData>* request =
+ new GenericRequest<TemplateURLData>(this, GetNextRequestHandle(), NULL,
+ data);
RegisterRequest(request);
ScheduleTask(FROM_HERE,
Bind(&WebDataService::UpdateKeywordImpl, this, request));
@@ -739,7 +735,7 @@
//
////////////////////////////////////////////////////////////////////////////////
-void WebDataService::AddKeywordImpl(GenericRequest<TemplateURL>* request) {
+void WebDataService::AddKeywordImpl(GenericRequest<TemplateURLData>* request) {
InitializeDatabaseIfNecessary();
if (db_ && !request->IsCancelled(NULL)) {
db_->GetKeywordTable()->AddKeyword(request->arg());
@@ -758,7 +754,8 @@
request->RequestComplete();
}
-void WebDataService::UpdateKeywordImpl(GenericRequest<TemplateURL>* request) {
+void WebDataService::UpdateKeywordImpl(
+ GenericRequest<TemplateURLData>* request) {
InitializeDatabaseIfNecessary();
if (db_ && !request->IsCancelled(NULL)) {
if (!db_->GetKeywordTable()->UpdateKeyword(request->arg())) {

Powered by Google App Engine
This is Rietveld 408576698