diff options
author | levin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 22:55:56 +0000 |
---|---|---|
committer | levin@chromium.org <levin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 22:55:56 +0000 |
commit | 774ef485a6f050b3ab9a8d360ff2de419a82d510 (patch) | |
tree | db0b7f1d4ab943239186531f345e9016c9339db4 /chrome/browser/webdata | |
parent | 192b9a0cc09f62b26b1435d1ce88a257d36fb992 (diff) | |
download | chromium_src-774ef485a6f050b3ab9a8d360ff2de419a82d510.zip chromium_src-774ef485a6f050b3ab9a8d360ff2de419a82d510.tar.gz chromium_src-774ef485a6f050b3ab9a8d360ff2de419a82d510.tar.bz2 |
Address feedback regarding r57641.
BUG=53557
TEST=unit_tests --gtest_filter=TemplateURLModelTest.LoadDoesAutoKeywordUpdate
Review URL: http://codereview.chromium.org/3237002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57743 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/webdata')
-rw-r--r-- | chrome/browser/webdata/web_data_service.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/chrome/browser/webdata/web_data_service.cc b/chrome/browser/webdata/web_data_service.cc index fc91bb2..0e3976b 100644 --- a/chrome/browser/webdata/web_data_service.cc +++ b/chrome/browser/webdata/web_data_service.cc @@ -93,11 +93,8 @@ WebDatabase* WebDataService::GetDatabase() { void WebDataService::AddKeyword(const TemplateURL& url) { // Ensure that the keyword is already generated (and cached) before caching - // the TemplateURL for use on another keyword. (keyword generation may involve - // a call to GoogleURLTracker::GoogleURL(), which may only be done on the - // UI thread.) - if (url.autogenerate_keyword()) - url.keyword(); + // the TemplateURL for use on another keyword. + url.EnsureKeyword(); GenericRequest<TemplateURL>* request = new GenericRequest<TemplateURL>(this, GetNextRequestHandle(), NULL, url); RegisterRequest(request); @@ -116,11 +113,8 @@ void WebDataService::RemoveKeyword(const TemplateURL& url) { void WebDataService::UpdateKeyword(const TemplateURL& url) { // Ensure that the keyword is already generated (and cached) before caching - // the TemplateURL for use on another keyword. (keyword generation may involve - // a call to GoogleURLTracker::GoogleURL(), which may only be done on the - // UI thread.) - if (url.autogenerate_keyword()) - url.keyword(); + // the TemplateURL for use on another keyword. + url.EnsureKeyword(); GenericRequest<TemplateURL>* request = new GenericRequest<TemplateURL>(this, GetNextRequestHandle(), NULL, url); RegisterRequest(request); |