summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/tab_contents.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 19:25:53 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 19:25:53 +0000
commita88dbdd5cf8de46acb59d2eb9b39188612b23da0 (patch)
tree9dd0bb97b5f4405db4cbd621b7bd2bb0b9dc5a3e /chrome/browser/tab_contents/tab_contents.cc
parent3e3c120b805368bbbd1a6a49cfca92f830254fbf (diff)
downloadchromium_src-a88dbdd5cf8de46acb59d2eb9b39188612b23da0.zip
chromium_src-a88dbdd5cf8de46acb59d2eb9b39188612b23da0.tar.gz
chromium_src-a88dbdd5cf8de46acb59d2eb9b39188612b23da0.tar.bz2
Lands http://codereview.chromium.org/545058 for Dmitry:
Preserve short_name for search engine from OSDD file and generate keyword from URL in OSDD for JS added search engines. BUG=7851 TEST=Try adding search engine via JS and autodetected search engines. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36384 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/tab_contents.cc')
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 10efa22..6b8ef7d 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -2355,7 +2355,10 @@ void TabContents::PageHasOSDD(RenderViewHost* render_view_host,
return;
std::wstring keyword = TemplateURLModel::GenerateKeyword(keyword_url,
autodetected);
- if (keyword.empty())
+
+ // For JS added OSDD empty keyword is OK because we will generate keyword
+ // later from OSDD content.
+ if (autodetected && keyword.empty())
return;
const TemplateURL* template_url =
url_model->GetTemplateURLForKeyword(keyword);