summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authormirandac@google.com <mirandac@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-28 00:03:38 +0000
committermirandac@google.com <mirandac@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-28 00:03:38 +0000
commit7b999994d9107144a5fc86d7e4ddb3083ad81792 (patch)
tree17630c59f2132ffeaa121d74bde12b3fc11b0894 /chrome/browser
parent683ca6b24ce05e40513d0c64ef0927c5c0ed20f3 (diff)
downloadchromium_src-7b999994d9107144a5fc86d7e4ddb3083ad81792.zip
chromium_src-7b999994d9107144a5fc86d7e4ddb3083ad81792.tar.gz
chromium_src-7b999994d9107144a5fc86d7e4ddb3083ad81792.tar.bz2
Add new search engine logos to template url data. This CL also reorganizes the way logos and search engine type data are stored. Because the search engine dialog is no longer an experiment running on few locales, move the data and logos into the template_url_prepopulate_data for each search engine.
BUG=42612 TEST=search engine dialog works as expected. Review URL: http://codereview.chromium.org/3040022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser_main.cc9
-rw-r--r--chrome/browser/search_engines/template_url.h16
-rw-r--r--chrome/browser/search_engines/template_url_prepopulate_data.cc396
-rw-r--r--chrome/browser/search_engines/template_url_prepopulate_data.h28
-rw-r--r--chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc5
-rw-r--r--chrome/browser/views/first_run_search_engine_view.cc55
6 files changed, 405 insertions, 104 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 1d319b8..3955084 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -1240,8 +1240,7 @@ int BrowserMain(const MainFunctionParams& parameters) {
if (master_prefs.run_search_engine_experiment) {
UMA_HISTOGRAM_ENUMERATION(
"Chrome.SearchSelectExperiment",
- TemplateURLPrepopulateData::GetSearchEngineType(
- default_search_engine),
+ default_search_engine->search_engine_type(),
TemplateURLPrepopulateData::SEARCH_ENGINE_MAX);
// If the selection has been randomized, also record the winner by slot.
if (master_prefs.randomize_search_engine_experiment) {
@@ -1253,8 +1252,7 @@ int BrowserMain(const MainFunctionParams& parameters) {
experiment_type.push_back('1' + engine_pos);
UMA_HISTOGRAM_ENUMERATION(
experiment_type,
- TemplateURLPrepopulateData::GetSearchEngineType(
- default_search_engine),
+ default_search_engine->search_engine_type(),
TemplateURLPrepopulateData::SEARCH_ENGINE_MAX);
} else {
NOTREACHED() << "Invalid search engine selection slot.";
@@ -1263,8 +1261,7 @@ int BrowserMain(const MainFunctionParams& parameters) {
} else {
UMA_HISTOGRAM_ENUMERATION(
"Chrome.SearchSelectExempt",
- TemplateURLPrepopulateData::GetSearchEngineType(
- default_search_engine),
+ default_search_engine->search_engine_type(),
TemplateURLPrepopulateData::SEARCH_ENGINE_MAX);
}
}
diff --git a/chrome/browser/search_engines/template_url.h b/chrome/browser/search_engines/template_url.h
index c00dad1..3373d42 100644
--- a/chrome/browser/search_engines/template_url.h
+++ b/chrome/browser/search_engines/template_url.h
@@ -11,6 +11,7 @@
#include "base/gtest_prod_util.h"
#include "base/time.h"
+#include "chrome/browser/search_engines/template_url_prepopulate_data.h"
#include "googleurl/src/gurl.h"
class TemplateURL;
@@ -274,6 +275,8 @@ class TemplateURL {
id_(0),
date_created_(base::Time::Now()),
usage_count_(0),
+ search_engine_type_(TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER),
+ logo_id_(0),
prepopulate_id_(0) {}
~TemplateURL() {}
@@ -414,6 +417,17 @@ class TemplateURL {
return input_encodings_;
}
+ void set_search_engine_type(TemplateURLPrepopulateData::SearchEngineType
+ search_engine_type) {
+ search_engine_type_ = search_engine_type;
+ }
+ TemplateURLPrepopulateData::SearchEngineType search_engine_type() const {
+ return search_engine_type_;
+ }
+
+ void set_logo_id(int logo_id) { logo_id_ = logo_id; }
+ int logo_id() const { return logo_id_; }
+
// Returns the unique identifier of this TemplateURL. The unique ID is set
// by the TemplateURLModel when the TemplateURL is added to it.
IDType id() const { return id_; }
@@ -456,6 +470,8 @@ class TemplateURL {
IDType id_;
base::Time date_created_;
int usage_count_;
+ TemplateURLPrepopulateData::SearchEngineType search_engine_type_;
+ int logo_id_;
int prepopulate_id_;
// TODO(sky): Add date last parsed OSD file.
diff --git a/chrome/browser/search_engines/template_url_prepopulate_data.cc b/chrome/browser/search_engines/template_url_prepopulate_data.cc
index 67a5342..20bd8a9 100644
--- a/chrome/browser/search_engines/template_url_prepopulate_data.cc
+++ b/chrome/browser/search_engines/template_url_prepopulate_data.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
+#include "grit/theme_resources.h"
#if defined(OS_WIN)
#undef IN // On Windows, windef.h defines this, which screws up "India" cases.
@@ -43,6 +44,9 @@ struct PrepopulatedEngine {
const char* const encoding;
const wchar_t* const suggest_url; // If NULL, this engine does not support
// suggestions.
+ // TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER if no logo is available.
+ const TemplateURLPrepopulateData::SearchEngineType search_engine_type;
+ const int logo_id; // Id for logo image in search engine dialog.
// Unique id for this prepopulate engine (corresponds to
// TemplateURL::prepopulate_id). This ID must be greater than zero and must
// remain the same for a particular site regardless of how the url changes;
@@ -76,6 +80,8 @@ const PrepopulatedEngine abcsok = {
L"http://abcsok.no/index.html?q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_ABCSOK,
+ IDR_SEARCH_ENGINE_LOGO_ABCSOK,
72,
};
@@ -86,6 +92,8 @@ const PrepopulatedEngine altavista = {
L"http://www.altavista.com/web/results?q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_ALTAVISTA,
+ IDR_SEARCH_ENGINE_LOGO_ALTAVISTA,
89,
};
@@ -96,6 +104,8 @@ const PrepopulatedEngine altavista_ar = {
L"http://ar.altavista.com/web/results?q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_ALTAVISTA,
+ IDR_SEARCH_ENGINE_LOGO_ALTAVISTA,
89,
};
@@ -106,6 +116,8 @@ const PrepopulatedEngine altavista_se = {
L"http://se.altavista.com/web/results?q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_ALTAVISTA,
+ IDR_SEARCH_ENGINE_LOGO_ALTAVISTA,
89,
};
@@ -116,6 +128,8 @@ const PrepopulatedEngine aol = {
L"http://search.aol.com/aol/search?query={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
35,
};
@@ -126,6 +140,8 @@ const PrepopulatedEngine araby = {
L"http://araby.com/?q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
12,
};
@@ -136,6 +152,8 @@ const PrepopulatedEngine ask = {
L"http://www.ask.com/web?q={searchTerms}",
"UTF-8",
L"http://ss.ask.com/query?q={searchTerms}&li=ff",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_ASK,
+ IDR_SEARCH_ENGINE_LOGO_ASK,
4,
};
@@ -146,6 +164,8 @@ const PrepopulatedEngine ask_de = {
L"http://de.ask.com/web?q={searchTerms}",
"UTF-8",
L"http://ss.de.ask.com/query?q={searchTerms}&li=ff",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_ASK,
+ IDR_SEARCH_ENGINE_LOGO_ASK,
4,
};
@@ -156,6 +176,8 @@ const PrepopulatedEngine ask_es = {
L"http://es.ask.com/web?q={searchTerms}",
"UTF-8",
L"http://ss.es.ask.com/query?q={searchTerms}&li=ff",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_ASK,
+ IDR_SEARCH_ENGINE_LOGO_ASK,
4,
};
@@ -166,6 +188,8 @@ const PrepopulatedEngine ask_it = {
L"http://it.ask.com/web?q={searchTerms}",
"UTF-8",
L"http://ss.it.ask.com/query?q={searchTerms}&li=ff",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_ASK,
+ IDR_SEARCH_ENGINE_LOGO_ASK,
4,
};
@@ -176,6 +200,8 @@ const PrepopulatedEngine ask_nl = {
L"http://nl.ask.com/web?q={searchTerms}",
"UTF-8",
L"http://ss.nl.ask.com/query?q={searchTerms}&li=ff",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_ASK,
+ IDR_SEARCH_ENGINE_LOGO_ASK,
4,
};
@@ -186,6 +212,8 @@ const PrepopulatedEngine ask_uk = {
L"http://uk.ask.com/web?q={searchTerms}",
"UTF-8",
L"http://ss.uk.ask.com/query?q={searchTerms}&li=ff",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_ASK,
+ IDR_SEARCH_ENGINE_LOGO_ASK,
4,
};
@@ -196,6 +224,8 @@ const PrepopulatedEngine atlas_cz = {
L"http://search.atlas.cz/?q={searchTerms}",
"windows-1250",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
27,
};
@@ -206,6 +236,8 @@ const PrepopulatedEngine atlas_sk = {
L"http://hladaj.atlas.sk/fulltext/?phrase={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
27,
};
@@ -216,6 +248,8 @@ const PrepopulatedEngine baidu = {
L"http://www.baidu.com/s?wd={searchTerms}",
"GB2312",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BAIDU,
+ IDR_SEARCH_ENGINE_LOGO_BAIDU,
21,
};
@@ -226,6 +260,8 @@ const PrepopulatedEngine bing = {
L"http://www.bing.com/search?q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -236,6 +272,8 @@ const PrepopulatedEngine bing_ar_XA = {
L"http://www.bing.com/search?setmkt=ar-XA&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
7, // Can't be 3 as this has to appear in the Arabian countries' lists
// alongside bing_en_XA.
};
@@ -247,6 +285,8 @@ const PrepopulatedEngine bing_bg_BG = {
L"http://www.bing.com/search?setmkt=bg-BG&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -257,6 +297,8 @@ const PrepopulatedEngine bing_cs_CZ = {
L"http://www.bing.com/search?setmkt=cs-CZ&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -267,6 +309,8 @@ const PrepopulatedEngine bing_da_DK = {
L"http://www.bing.com/search?setmkt=da-DK&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -277,6 +321,8 @@ const PrepopulatedEngine bing_de_AT = {
L"http://www.bing.com/search?setmkt=de-AT&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -287,6 +333,8 @@ const PrepopulatedEngine bing_de_CH = {
L"http://www.bing.com/search?setmkt=de-CH&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -297,6 +345,8 @@ const PrepopulatedEngine bing_de_DE = {
L"http://www.bing.com/search?setmkt=de-DE&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -307,6 +357,8 @@ const PrepopulatedEngine bing_el_GR = {
L"http://www.bing.com/search?setmkt=el-GR&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -317,6 +369,8 @@ const PrepopulatedEngine bing_en_AU = {
L"http://www.bing.com/search?setmkt=en-AU&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -327,6 +381,8 @@ const PrepopulatedEngine bing_en_CA = {
L"http://www.bing.com/search?setmkt=en-CA&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -337,6 +393,8 @@ const PrepopulatedEngine bing_en_GB = {
L"http://www.bing.com/search?setmkt=en-GB&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -347,6 +405,8 @@ const PrepopulatedEngine bing_en_ID = {
L"http://www.bing.com/search?setmkt=en-ID&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -357,6 +417,8 @@ const PrepopulatedEngine bing_en_IE = {
L"http://www.bing.com/search?setmkt=en-IE&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -367,6 +429,8 @@ const PrepopulatedEngine bing_en_IN = {
L"http://www.bing.com/search?setmkt=en-IN&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -377,6 +441,8 @@ const PrepopulatedEngine bing_en_MY = {
L"http://www.bing.com/search?setmkt=en-MY&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -387,6 +453,8 @@ const PrepopulatedEngine bing_en_NZ = {
L"http://www.bing.com/search?setmkt=en-NZ&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -397,6 +465,8 @@ const PrepopulatedEngine bing_en_PH = {
L"http://www.bing.com/search?setmkt=en-PH&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -407,6 +477,8 @@ const PrepopulatedEngine bing_en_SG = {
L"http://www.bing.com/search?setmkt=en-SG&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -417,6 +489,8 @@ const PrepopulatedEngine bing_en_US = {
L"http://www.bing.com/search?setmkt=en-US&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -427,6 +501,8 @@ const PrepopulatedEngine bing_en_XA = {
L"http://www.bing.com/search?setmkt=en-XA&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -437,6 +513,8 @@ const PrepopulatedEngine bing_en_ZA = {
L"http://www.bing.com/search?setmkt=en-ZA&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -447,6 +525,8 @@ const PrepopulatedEngine bing_es_AR = {
L"http://www.bing.com/search?setmkt=es-AR&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -457,6 +537,8 @@ const PrepopulatedEngine bing_es_CL = {
L"http://www.bing.com/search?setmkt=es-CL&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -467,6 +549,8 @@ const PrepopulatedEngine bing_es_ES = {
L"http://www.bing.com/search?setmkt=es-ES&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -477,6 +561,8 @@ const PrepopulatedEngine bing_es_MX = {
L"http://www.bing.com/search?setmkt=es-MX&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -487,6 +573,8 @@ const PrepopulatedEngine bing_es_XL = {
L"http://www.bing.com/search?setmkt=es-XL&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -497,6 +585,8 @@ const PrepopulatedEngine bing_et_EE = {
L"http://www.bing.com/search?setmkt=et-EE&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -507,6 +597,8 @@ const PrepopulatedEngine bing_fi_FI = {
L"http://www.bing.com/search?setmkt=fi-FI&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -517,6 +609,8 @@ const PrepopulatedEngine bing_fr_BE = {
L"http://www.bing.com/search?setmkt=fr-BE&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
7,
};
@@ -527,6 +621,8 @@ const PrepopulatedEngine bing_fr_CA = {
L"http://www.bing.com/search?setmkt=fr-CA&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
7,
};
@@ -537,6 +633,8 @@ const PrepopulatedEngine bing_fr_CH = {
L"http://www.bing.com/search?setmkt=fr-CH&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
7,
};
@@ -547,6 +645,8 @@ const PrepopulatedEngine bing_fr_FR = {
L"http://www.bing.com/search?setmkt=fr-FR&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -557,6 +657,8 @@ const PrepopulatedEngine bing_he_IL = {
L"http://www.bing.com/search?setmkt=he-IL&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -567,6 +669,8 @@ const PrepopulatedEngine bing_hr_HR = {
L"http://www.bing.com/search?setmkt=hr-HR&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -577,6 +681,8 @@ const PrepopulatedEngine bing_hu_HU = {
L"http://www.bing.com/search?setmkt=hu-HU&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -587,6 +693,8 @@ const PrepopulatedEngine bing_it_IT = {
L"http://www.bing.com/search?setmkt=it-IT&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -597,6 +705,8 @@ const PrepopulatedEngine bing_ja_JP = {
L"http://www.bing.com/search?setmkt=ja-JP&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -607,6 +717,8 @@ const PrepopulatedEngine bing_ko_KR = {
L"http://www.bing.com/search?setmkt=ko-KR&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -617,6 +729,8 @@ const PrepopulatedEngine bing_lt_LT = {
L"http://www.bing.com/search?setmkt=lt-LT&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -627,6 +741,8 @@ const PrepopulatedEngine bing_lv_LV = {
L"http://www.bing.com/search?setmkt=lv-LV&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -637,6 +753,8 @@ const PrepopulatedEngine bing_nb_NO = {
L"http://www.bing.com/search?setmkt=nb-NO&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -647,6 +765,8 @@ const PrepopulatedEngine bing_nl_BE = {
L"http://www.bing.com/search?setmkt=nl-BE&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -657,6 +777,8 @@ const PrepopulatedEngine bing_nl_NL = {
L"http://www.bing.com/search?setmkt=nl-NL&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -667,6 +789,8 @@ const PrepopulatedEngine bing_pl_PL = {
L"http://www.bing.com/search?setmkt=pl-PL&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -677,6 +801,8 @@ const PrepopulatedEngine bing_pt_BR = {
L"http://www.bing.com/search?setmkt=pt-BR&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -687,6 +813,8 @@ const PrepopulatedEngine bing_pt_PT = {
L"http://www.bing.com/search?setmkt=pt-PT&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -697,6 +825,8 @@ const PrepopulatedEngine bing_ro_RO = {
L"http://www.bing.com/search?setmkt=ro-RO&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -707,6 +837,8 @@ const PrepopulatedEngine bing_ru_RU = {
L"http://www.bing.com/search?setmkt=ru-RU&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -717,6 +849,8 @@ const PrepopulatedEngine bing_sl_SI = {
L"http://www.bing.com/search?setmkt=sl-SI&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -727,6 +861,8 @@ const PrepopulatedEngine bing_sk_SK = {
L"http://www.bing.com/search?setmkt=sk-SK&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -737,6 +873,8 @@ const PrepopulatedEngine bing_sv_SE = {
L"http://www.bing.com/search?setmkt=sv-SE&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -747,6 +885,8 @@ const PrepopulatedEngine bing_th_TH = {
L"http://www.bing.com/search?setmkt=th-TH&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -757,6 +897,8 @@ const PrepopulatedEngine bing_tr_TR = {
L"http://www.bing.com/search?setmkt=tr-TR&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -767,6 +909,8 @@ const PrepopulatedEngine bing_uk_UA = {
L"http://www.bing.com/search?setmkt=uk-UA&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -777,6 +921,8 @@ const PrepopulatedEngine bing_zh_CN = {
L"http://www.bing.com/search?setmkt=zh-CN&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -787,6 +933,8 @@ const PrepopulatedEngine bing_zh_HK = {
L"http://www.bing.com/search?setmkt=zh-HK&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -797,6 +945,8 @@ const PrepopulatedEngine bing_zh_TW = {
L"http://www.bing.com/search?setmkt=zh-TW&q={searchTerms}",
"UTF-8",
L"http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
+ IDR_SEARCH_ENGINE_LOGO_BING,
3,
};
@@ -807,6 +957,8 @@ const PrepopulatedEngine centrum_cz = {
L"http://search.centrum.cz/index.php?charset={inputEncoding}&q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_CENTRUM,
+ IDR_SEARCH_ENGINE_LOGO_CENTRUM,
26,
};
@@ -817,6 +969,8 @@ const PrepopulatedEngine centrum_sk = {
L"http://search.centrum.sk/index.php?charset={inputEncoding}&q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_CENTRUM,
+ IDR_SEARCH_ENGINE_LOGO_CENTRUM,
26,
};
@@ -826,7 +980,9 @@ const PrepopulatedEngine daum = {
"http://search.daum.net/favicon.ico",
L"http://search.daum.net/search?q={searchTerms}",
"EUC-KR",
- L"http://sug.search.daum.net/search_nsuggest?mod=fxjson&q={searchTerms}",
+ L"http://sug.search.daum.net/search_nsuggest?mod=fxjson&q={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_DAUM,
+ IDR_SEARCH_ENGINE_LOGO_DAUM,
68,
};
@@ -837,6 +993,8 @@ const PrepopulatedEngine delfi_lt = {
L"http://search.delfi.lt/search.php?q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_DELFI,
+ IDR_SEARCH_ENGINE_LOGO_DELFI,
45,
};
@@ -847,6 +1005,8 @@ const PrepopulatedEngine delfi_lv = {
L"http://smart.delfi.lv/i.php?enc={inputEncoding}&q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_DELFI,
+ IDR_SEARCH_ENGINE_LOGO_DELFI,
45,
};
@@ -857,6 +1017,8 @@ const PrepopulatedEngine diri = {
L"http://diri.bg/search.php?textfield={searchTerms}",
"windows-1251",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_DIRI,
+ IDR_SEARCH_ENGINE_LOGO_DIRI,
32,
};
@@ -867,6 +1029,8 @@ const PrepopulatedEngine eniro_fi = {
L"http://eniro.fi/query?search_word={searchTerms}&what=web_local",
"ISO-8859-1",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
29,
};
@@ -877,6 +1041,8 @@ const PrepopulatedEngine eniro_se = {
L"http://eniro.se/query?search_word={searchTerms}&what=web_local",
"ISO-8859-1",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
29,
};
@@ -887,6 +1053,8 @@ const PrepopulatedEngine fonecta_02_fi = {
L"http://www.02.fi/haku/{searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
46,
};
@@ -898,6 +1066,8 @@ const PrepopulatedEngine go = {
L"fr=hsusgo1",
"ISO-8859-1",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
40,
};
@@ -908,6 +1078,8 @@ const PrepopulatedEngine goo = {
L"http://search.goo.ne.jp/web.jsp?MT={searchTerms}&IE={inputEncoding}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_GOO,
+ IDR_SEARCH_ENGINE_LOGO_GOO,
23,
};
@@ -920,6 +1092,8 @@ const PrepopulatedEngine google = {
L"q={searchTerms}",
"UTF-8",
L"{google:baseSuggestURL}search?client=chrome&hl={language}&q={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_GOOGLE,
+ IDR_SEARCH_ENGINE_LOGO_GOOGLE,
1,
};
@@ -930,6 +1104,8 @@ const PrepopulatedEngine guruji = {
L"http://guruji.com/search?q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
38,
};
@@ -940,6 +1116,8 @@ const PrepopulatedEngine hispavista = {
L"http://buscar.hispavista.com/?cadena={searchTerms}",
"iso-8859-1",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
18,
};
@@ -950,6 +1128,8 @@ const PrepopulatedEngine in = {
L"http://find.in.gr/result.asp?q={searchTerms}",
"ISO-8859-7",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_IN,
+ IDR_SEARCH_ENGINE_LOGO_IN,
54,
};
@@ -960,6 +1140,8 @@ const PrepopulatedEngine jabse = {
L"http://www.jabse.com/searchmachine.php?query={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
19,
};
@@ -970,6 +1152,8 @@ const PrepopulatedEngine jubii = {
L"http://search.jubii.dk/cgi-bin/pursuit?query={searchTerms}",
"ISO-8859-1",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
28,
};
@@ -980,6 +1164,8 @@ const PrepopulatedEngine kvasir = {
L"http://www.kvasir.no/nettsok/searchResult.html?searchExpr={searchTerms}",
"ISO-8859-1",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
73,
};
@@ -990,6 +1176,8 @@ const PrepopulatedEngine latne = {
L"http://latne.lv/siets.php?q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
71,
};
@@ -1000,6 +1188,8 @@ const PrepopulatedEngine leit = {
L"http://leit.is/query.aspx?qt={searchTerms}",
"ISO-8859-1",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
59,
};
@@ -1010,6 +1200,8 @@ const PrepopulatedEngine libero = {
L"http://arianna.libero.it/search/abin/integrata.cgi?query={searchTerms}",
"ISO-8859-1",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
63,
};
@@ -1020,6 +1212,8 @@ const PrepopulatedEngine mail_ru = {
L"http://go.mail.ru/search?q={searchTerms}",
"windows-1251",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_MAILRU,
+ IDR_SEARCH_ENGINE_LOGO_MAILRU,
83,
};
@@ -1030,6 +1224,8 @@ const PrepopulatedEngine maktoob = {
L"http://www.maktoob.com/searchResult.php?q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
13,
};
@@ -1040,6 +1236,8 @@ const PrepopulatedEngine masrawy = {
L"http://masrawy.com/new/search.aspx?sr={searchTerms}",
"windows-1256",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
14,
};
@@ -1050,6 +1248,8 @@ const PrepopulatedEngine mynet = {
L"http://arama.mynet.com/search.aspx?q={searchTerms}&pg=q",
"windows-1254",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
101,
};
@@ -1060,6 +1260,8 @@ const PrepopulatedEngine najdi = {
L"http://www.najdi.si/search.jsp?q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_NAJDI,
+ IDR_SEARCH_ENGINE_LOGO_NAJDI,
87,
};
@@ -1070,6 +1272,8 @@ const PrepopulatedEngine nate = {
L"http://nate.search.empas.com/search/all.html?q={searchTerms}",
"EUC-KR",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
69,
};
@@ -1082,6 +1286,8 @@ const PrepopulatedEngine naver = {
"UTF-8",
L"http://ac.search.naver.com/autocompl?m=s&ie={inputEncoding}&oe=utf-8&"
L"q={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_NAVER,
+ IDR_SEARCH_ENGINE_LOGO_NAVER,
67,
};
@@ -1092,6 +1298,8 @@ const PrepopulatedEngine neti = {
L"http://www.neti.ee/cgi-bin/otsing?query={searchTerms}",
"ISO-8859-1",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_NETI,
+ IDR_SEARCH_ENGINE_LOGO_NETI,
44,
};
@@ -1102,6 +1310,8 @@ const PrepopulatedEngine netsprint = {
L"http://www.netsprint.pl/serwis/search?q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_NETSPRINT,
+ IDR_SEARCH_ENGINE_LOGO_NETSPRINT,
30,
};
@@ -1112,6 +1322,8 @@ const PrepopulatedEngine nur_kz = {
L"http://search.nur.kz/?encoding={inputEncoding}&query={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
20,
};
@@ -1122,6 +1334,8 @@ const PrepopulatedEngine ok = {
L"http://ok.hu/katalogus?q={searchTerms}",
"ISO-8859-2",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OK,
+ IDR_SEARCH_ENGINE_LOGO_OK,
6,
};
@@ -1132,6 +1346,8 @@ const PrepopulatedEngine onet = {
L"http://szukaj.onet.pl/query.html?qt={searchTerms}",
"ISO-8859-2",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
75,
};
@@ -1142,6 +1358,8 @@ const PrepopulatedEngine pogodak_ba = {
L"http://www.pogodak.ba/search.jsp?q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_POGODAK,
+ IDR_SEARCH_ENGINE_LOGO_POGODAK,
24,
};
@@ -1152,6 +1370,8 @@ const PrepopulatedEngine pogodak_hr = {
L"http://www.pogodak.hr/search.jsp?q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_POGODAK,
+ IDR_SEARCH_ENGINE_LOGO_POGODAK,
24,
};
@@ -1162,6 +1382,8 @@ const PrepopulatedEngine pogodak_rs = {
L"http://www.pogodak.rs/search.jsp?q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_POGODAK,
+ IDR_SEARCH_ENGINE_LOGO_POGODAK,
24,
};
@@ -1172,6 +1394,8 @@ const PrepopulatedEngine pogodok = {
L"http://www.pogodok.com.mk/search.jsp?q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_POGODOK_MK,
+ IDR_SEARCH_ENGINE_LOGO_POGODOK_MK,
24, // Really the same engine as Pogodak, just has a small name change.
};
@@ -1182,6 +1406,8 @@ const PrepopulatedEngine rambler = {
L"http://www.rambler.ru/srch?words={searchTerms}",
"windows-1251",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_RAMBLER,
+ IDR_SEARCH_ENGINE_LOGO_RAMBLER,
16,
};
@@ -1192,6 +1418,8 @@ const PrepopulatedEngine rediff = {
L"http://search1.rediff.com/dirsrch/default.asp?MT={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
37,
};
@@ -1202,6 +1430,8 @@ const PrepopulatedEngine rednano = {
L"http://rednano.sg/sfe/lwi.action?querystring={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
41,
};
@@ -1212,6 +1442,8 @@ const PrepopulatedEngine sanook = {
L"http://search.sanook.com/search.php?q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_SANOOK,
+ IDR_SEARCH_ENGINE_LOGO_SANOOK,
100,
};
@@ -1222,6 +1454,8 @@ const PrepopulatedEngine sapo = {
L"http://pesquisa.sapo.pt/?q={searchTerms}",
"UTF-8",
L"http://pesquisa.sapo.pt/livesapo?q={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_SAPO,
+ IDR_SEARCH_ENGINE_LOGO_SAPO,
77,
};
@@ -1232,6 +1466,8 @@ const PrepopulatedEngine search_de_CH = {
L"http://www.search.ch/index.de.html?q={searchTerms}",
"ISO-8859-1",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
51,
};
@@ -1242,6 +1478,8 @@ const PrepopulatedEngine search_fr_CH = {
L"http://www.search.ch/index.fr.html?q={searchTerms}",
"ISO-8859-1",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
22,
};
@@ -1253,6 +1491,8 @@ const PrepopulatedEngine seznam = {
"UTF-8",
L"http:///suggest.fulltext.seznam.cz/?dict=fulltext_ff&phrase={searchTerms}&"
L"encoding={inputEncoding}&response_encoding=utf-8",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_SEZNAM,
+ IDR_SEARCH_ENGINE_LOGO_SEZNAM,
25,
};
@@ -1263,6 +1503,8 @@ const PrepopulatedEngine spray = {
L"http://www.eniro.se/query?ax=spray&search_word={searchTerms}&what=web",
"ISO-8859-1",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
99,
};
@@ -1273,6 +1515,8 @@ const PrepopulatedEngine terra_ar = {
L"http://buscar.terra.com.ar/Default.aspx?query={searchTerms}&source=Search",
"ISO-8859-1",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
90,
};
@@ -1283,6 +1527,8 @@ const PrepopulatedEngine terra_es = {
L"http://buscador.terra.es/Default.aspx?query={searchTerms}&source=Search",
"ISO-8859-1",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
90,
};
@@ -1293,6 +1539,8 @@ const PrepopulatedEngine tut = {
L"http://search.tut.by/?query={searchTerms}",
"windows-1251",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_TUT,
+ IDR_SEARCH_ENGINE_LOGO_TUT,
17,
};
@@ -1303,6 +1551,8 @@ const PrepopulatedEngine uol = {
L"http://busca.uol.com.br/www/index.html?q={searchTerms}",
"ISO-8859-1",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
82,
};
@@ -1313,6 +1563,8 @@ const PrepopulatedEngine virgilio = {
L"http://ricerca.alice.it/ricerca?qs={searchTerms}",
"ISO-8859-1",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_VIRGILIO,
+ IDR_SEARCH_ENGINE_LOGO_VIRGILIO,
62,
};
@@ -1323,6 +1575,8 @@ const PrepopulatedEngine walla = {
L"http://search.walla.co.il/?e=hew&q={searchTerms}",
"windows-1255",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_WALLA,
+ IDR_SEARCH_ENGINE_LOGO_WALLA,
55,
};
@@ -1333,6 +1587,8 @@ const PrepopulatedEngine wp = {
L"http://szukaj.wp.pl/szukaj.html?szukaj={searchTerms}",
"ISO-8859-2",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
76,
};
@@ -1343,6 +1599,8 @@ const PrepopulatedEngine yahoo = {
L"http://search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}",
"UTF-8",
L"http://ff.search.yahoo.com/gossip?output=fxjson&command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1358,6 +1616,8 @@ const PrepopulatedEngine yahoo_ar = {
"UTF-8",
L"http://ar-sayt.ff.search.yahoo.com/gossip-ar-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1369,6 +1629,8 @@ const PrepopulatedEngine yahoo_at = {
L"p={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1381,6 +1643,8 @@ const PrepopulatedEngine yahoo_au = {
"UTF-8",
L"http://aue-sayt.ff.search.yahoo.com/gossip-au-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1393,6 +1657,8 @@ const PrepopulatedEngine yahoo_br = {
"UTF-8",
L"http://br-sayt.ff.search.yahoo.com/gossip-br-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1405,6 +1671,8 @@ const PrepopulatedEngine yahoo_ca = {
"UTF-8",
L"http://gossip.ca.yahoo.com/gossip-ca-sayt?output=fxjsonp&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1416,6 +1684,8 @@ const PrepopulatedEngine yahoo_ch = {
L"p={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1428,6 +1698,8 @@ const PrepopulatedEngine yahoo_cl = {
"UTF-8",
L"http://gossip.telemundo.yahoo.com/gossip-e1-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1441,6 +1713,8 @@ const PrepopulatedEngine yahoo_cn = {
// http://cn.yahoo.com/cnsuggestion/suggestion.inc.php?of=fxjson&query=
// returns in a proprietary format ('|' delimeted word list).
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1453,6 +1727,8 @@ const PrepopulatedEngine yahoo_co = {
"UTF-8",
L"http://gossip.telemundo.yahoo.com/gossip-e1-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1465,6 +1741,8 @@ const PrepopulatedEngine yahoo_de = {
"UTF-8",
L"http://de-sayt.ff.search.yahoo.com/gossip-de-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1476,6 +1754,8 @@ const PrepopulatedEngine yahoo_dk = {
L"p={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1488,6 +1768,8 @@ const PrepopulatedEngine yahoo_es = {
"UTF-8",
L"http://es-sayt.ff.search.yahoo.com/gossip-es-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1499,6 +1781,8 @@ const PrepopulatedEngine yahoo_fi = {
L"p={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1511,6 +1795,8 @@ const PrepopulatedEngine yahoo_fr = {
"UTF-8",
L"http://fr-sayt.ff.search.yahoo.com/gossip-fr-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1525,6 +1811,8 @@ const PrepopulatedEngine yahoo_hk = {
// returns a JSON with key-value pairs. Setting parameters (ot, of, output)
// to fxjson, json, or js doesn't help.
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1537,6 +1825,8 @@ const PrepopulatedEngine yahoo_id = {
"UTF-8",
L"http://id-sayt.ff.search.yahoo.com/gossip-id-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1549,6 +1839,8 @@ const PrepopulatedEngine yahoo_in = {
"UTF-8",
L"http://in-sayt.ff.search.yahoo.com/gossip-in-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1561,6 +1853,8 @@ const PrepopulatedEngine yahoo_it = {
"UTF-8",
L"http://it-sayt.ff.search.yahoo.com/gossip-it-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1572,6 +1866,8 @@ const PrepopulatedEngine yahoo_jp = {
L"p={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOOJP,
+ IDR_SEARCH_ENGINE_LOGO_YAHOOJP,
2,
};
@@ -1584,6 +1880,8 @@ const PrepopulatedEngine yahoo_kr = {
"UTF-8",
L"http://kr.atc.search.yahoo.com/atcx.php?property=main&ot=fxjson&"
L"ei=utf8&eo=utf8&command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1596,6 +1894,8 @@ const PrepopulatedEngine yahoo_malaysia = {
"UTF-8",
L"http://my-sayt.ff.search.yahoo.com/gossip-my-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1608,6 +1908,8 @@ const PrepopulatedEngine yahoo_mx = {
"UTF-8",
L"http://gossip.mx.yahoo.com/gossip-mx-sayt?output=fxjsonp&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1619,6 +1921,8 @@ const PrepopulatedEngine yahoo_nl = {
L"p={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1630,6 +1934,8 @@ const PrepopulatedEngine yahoo_no = {
L"p={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1642,6 +1948,8 @@ const PrepopulatedEngine yahoo_nz = {
"UTF-8",
L"http://aue-sayt.ff.search.yahoo.com/gossip-nz-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1654,6 +1962,8 @@ const PrepopulatedEngine yahoo_pe = {
"UTF-8",
L"http://gossip.telemundo.yahoo.com/gossip-e1-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1666,6 +1976,8 @@ const PrepopulatedEngine yahoo_ph = {
"UTF-8",
L"http://ph-sayt.ff.search.yahoo.com/gossip-ph-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1677,6 +1989,8 @@ const PrepopulatedEngine yahoo_qc = {
L"p={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
5, // Can't be 2 as this has to appear in the Canada list alongside yahoo_ca.
};
@@ -1688,6 +2002,8 @@ const PrepopulatedEngine yahoo_ru = {
L"p={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1699,6 +2015,8 @@ const PrepopulatedEngine yahoo_se = {
L"p={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1711,6 +2029,8 @@ const PrepopulatedEngine yahoo_sg = {
"UTF-8",
L"http://sg-sayt.ff.search.yahoo.com/gossip-sg-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1722,7 +2042,9 @@ const PrepopulatedEngine yahoo_th = {
L"p={searchTerms}",
"UTF-8",
L"http://th-sayt.ff.search.yahoo.com/gossip-th-sayt?output=fxjson&"
- L"command={searchTerms}",
+ L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1736,6 +2058,8 @@ const PrepopulatedEngine yahoo_tw = {
// "http://tw.yahoo.com/ac/ac_search.php?eo=utf8&of=js&prop=web&query="
// returns a JSON file prepended with 'fxsearch=('.
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1748,6 +2072,8 @@ const PrepopulatedEngine yahoo_uk = {
"UTF-8",
L"http://uk-sayt.ff.search.yahoo.com/gossip-uk-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1760,6 +2086,8 @@ const PrepopulatedEngine yahoo_ve = {
"UTF-8",
L"http://gossip.telemundo.yahoo.com/gossip-e1-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1772,6 +2100,8 @@ const PrepopulatedEngine yahoo_vn = {
"UTF-8",
L"http://vn-sayt.ff.search.yahoo.com/gossip-vn-sayt?output=fxjson&"
L"command={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
+ IDR_SEARCH_ENGINE_LOGO_YAHOO,
2,
};
@@ -1782,6 +2112,8 @@ const PrepopulatedEngine yamli = {
L"http://www.yamli.com/#q={searchTerms}",
"UTF-8",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_OTHER,
+ IDR_SEARCH_ENGINE_LOGO_OTHER,
11,
};
@@ -1792,6 +2124,8 @@ const PrepopulatedEngine yandex_ru = {
L"http://yandex.ru/yandsearch?text={searchTerms}",
"UTF-8",
L"http://suggest.yandex.net/suggest-ff.cgi?part={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YANDEX,
+ IDR_SEARCH_ENGINE_LOGO_YANDEX,
15,
};
@@ -1802,6 +2136,8 @@ const PrepopulatedEngine yandex_ua = {
L"http://yandex.ua/yandsearch?text={searchTerms}",
"UTF-8",
L"http://suggest.yandex.net/suggest-ff.cgi?part={searchTerms}",
+ TemplateURLPrepopulateData::SEARCH_ENGINE_YANDEX,
+ IDR_SEARCH_ENGINE_LOGO_YANDEX,
15,
};
@@ -1812,6 +2148,8 @@ const PrepopulatedEngine zoznam = {
L"http://zoznam.sk/hladaj.fcgi?s={searchTerms}",
"windows-1250",
NULL,
+ TemplateURLPrepopulateData::SEARCH_ENGINE_ZOZNAM,
+ IDR_SEARCH_ENGINE_LOGO_ZOZNAM,
85,
};
@@ -2818,6 +3156,8 @@ TemplateURL* MakePrepopulatedTemplateURL(const wchar_t* name,
const char* favicon_url,
const wchar_t* suggest_url,
const char* encoding,
+ SearchEngineType search_engine_type,
+ int logo_id,
int id) {
TemplateURL* new_turl = new TemplateURL();
new_turl->SetURL(WideToUTF8(search_url), 0, 0);
@@ -2836,6 +3176,8 @@ TemplateURL* MakePrepopulatedTemplateURL(const wchar_t* name,
std::vector<std::string> turl_encodings;
turl_encodings.push_back(encoding);
new_turl->set_input_encodings(turl_encodings);
+ new_turl->set_search_engine_type(search_engine_type);
+ new_turl->set_logo_id(logo_id);
new_turl->set_prepopulate_id(id);
return new_turl;
}
@@ -2853,6 +3195,8 @@ void GetPrepopulatedTemplatefromPrefs(PrefService* prefs,
std::wstring suggest_url;
std::string favicon_url;
std::string encoding;
+ int search_engine_type;
+ int logo_id;
int id;
size_t num_engines = list->GetSize();
@@ -2866,6 +3210,9 @@ void GetPrepopulatedTemplatefromPrefs(PrefService* prefs,
engine->Get(L"suggest_url", &val) && val->GetAsString(&suggest_url) &&
engine->Get(L"favicon_url", &val) && val->GetAsString(&favicon_url) &&
engine->Get(L"encoding", &val) && val->GetAsString(&encoding) &&
+ engine->Get(L"search_engine_type", &val) && val->GetAsInteger(
+ &search_engine_type) &&
+ engine->Get(L"logo_id", &val) && val->GetAsInteger(&logo_id) &&
engine->Get(L"id", &val) && val->GetAsInteger(&id)) {
// These next fields are not allowed to be empty.
if (search_url.empty() || favicon_url.empty() || encoding.empty())
@@ -2875,12 +3222,14 @@ void GetPrepopulatedTemplatefromPrefs(PrefService* prefs,
continue;
}
t_urls->push_back(MakePrepopulatedTemplateURL(name.c_str(),
- keyword.c_str(),
- search_url.c_str(),
- favicon_url.c_str(),
- suggest_url.c_str(),
- encoding.c_str(),
- id));
+ keyword.c_str(),
+ search_url.c_str(),
+ favicon_url.c_str(),
+ suggest_url.c_str(),
+ encoding.c_str(),
+ static_cast<SearchEngineType>(search_engine_type),
+ logo_id,
+ id));
}
}
@@ -2905,38 +3254,11 @@ void GetPrepopulatedEngines(PrefService* prefs,
engines[i]->favicon_url,
engines[i]->suggest_url,
engines[i]->encoding,
+ engines[i]->search_engine_type,
+ engines[i]->logo_id,
engines[i]->id);
t_urls->push_back(turl);
}
}
-SearchEngineType GetSearchEngineType(const TemplateURL* search_engine) {
- switch (search_engine->prepopulate_id()) {
- case 1:
- return SEARCH_ENGINE_GOOGLE;
- case 2:
- // Construction of country id = 'J' << 8 | 'P' = 19024
- return (GetCountryIDFromPrefs(NULL) == 19024) ? SEARCH_ENGINE_YAHOOJP :
- SEARCH_ENGINE_YAHOO;
- case 3:
- return SEARCH_ENGINE_BING;
- case 4:
- return SEARCH_ENGINE_ASK;
- case 15:
- return SEARCH_ENGINE_YANDEX;
- case 25:
- return SEARCH_ENGINE_SEZNAM;
- case 26:
- return SEARCH_ENGINE_CENTRUM;
- case 30:
- return SEARCH_ENGINE_NETSPRINT;
- case 62:
- return SEARCH_ENGINE_VIRGILIO;
- case 83:
- return SEARCH_ENGINE_MAILRU;
- default:
- return SEARCH_ENGINE_OTHER;
- }
-}
-
} // namespace TemplateURLPrepopulateData
diff --git a/chrome/browser/search_engines/template_url_prepopulate_data.h b/chrome/browser/search_engines/template_url_prepopulate_data.h
index d6afc98..612d80f 100644
--- a/chrome/browser/search_engines/template_url_prepopulate_data.h
+++ b/chrome/browser/search_engines/template_url_prepopulate_data.h
@@ -27,6 +27,26 @@ enum SearchEngineType {
SEARCH_ENGINE_NETSPRINT,
SEARCH_ENGINE_VIRGILIO,
SEARCH_ENGINE_MAILRU,
+ SEARCH_ENGINE_ABCSOK,
+ SEARCH_ENGINE_ALTAVISTA,
+ SEARCH_ENGINE_BAIDU,
+ SEARCH_ENGINE_DAUM,
+ SEARCH_ENGINE_DELFI,
+ SEARCH_ENGINE_DIRI,
+ SEARCH_ENGINE_GOO,
+ SEARCH_ENGINE_IN,
+ SEARCH_ENGINE_NAJDI,
+ SEARCH_ENGINE_NAVER,
+ SEARCH_ENGINE_NETI,
+ SEARCH_ENGINE_OK,
+ SEARCH_ENGINE_POGODAK,
+ SEARCH_ENGINE_POGODOK_MK,
+ SEARCH_ENGINE_RAMBLER,
+ SEARCH_ENGINE_SANOOK,
+ SEARCH_ENGINE_SAPO,
+ SEARCH_ENGINE_TUT,
+ SEARCH_ENGINE_WALLA,
+ SEARCH_ENGINE_ZOZNAM,
SEARCH_ENGINE_MAX // Bounding max value needed for UMA histogram macro.
};
@@ -45,14 +65,6 @@ void GetPrepopulatedEngines(PrefService* prefs,
std::vector<TemplateURL*>* t_urls,
size_t* default_search_provider_index);
-// Returns the type of the search engine to be recorded in UMA. The type
-// is determined by mapping the search engine's |id| to the set of search
-// engines we are interested in. Because this is only a temporary test
-// for a small set of search engines, we use this simple switch statement
-// instead of embedding a UMA type as part of the struct of every search
-// engine.
-SearchEngineType GetSearchEngineType(const TemplateURL* search_engine);
-
} // namespace TemplateURLPrepopulateData
#endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_
diff --git a/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc b/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc
index fb02c52..e037499 100644
--- a/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc
+++ b/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc
@@ -92,6 +92,8 @@ TEST_F(TemplateURLPrepopulateDataTest, ProvidersFromPrefs) {
" \"favicon_url\":\"http://foi.com/favicon.ico\","
" \"suggest_url\":\"\","
" \"encoding\":\"UTF-8\","
+ " \"search_engine_type\":1,"
+ " \"logo_id\":0,"
" \"id\":1001"
" }"
" ]"
@@ -121,4 +123,7 @@ TEST_F(TemplateURLPrepopulateDataTest, ProvidersFromPrefs) {
EXPECT_EQ("foi.com", t_urls[0]->GetFavIconURL().host());
EXPECT_EQ(1u, t_urls[0]->input_encodings().size());
EXPECT_EQ(1001, t_urls[0]->prepopulate_id());
+ EXPECT_EQ(TemplateURLPrepopulateData::SEARCH_ENGINE_GOOGLE,
+ t_urls[0]->search_engine_type());
+ EXPECT_EQ(0, t_urls[0]->logo_id());
}
diff --git a/chrome/browser/views/first_run_search_engine_view.cc b/chrome/browser/views/first_run_search_engine_view.cc
index 174f830..96d93cf 100644
--- a/chrome/browser/views/first_run_search_engine_view.cc
+++ b/chrome/browser/views/first_run_search_engine_view.cc
@@ -35,9 +35,6 @@ using TemplateURLPrepopulateData::SearchEngineType;
namespace {
-// Represents an id for which we have no logo.
-const int kNoLogo = -1;
-
// Size to scale logos down to if showing 4 instead of 3 choices. Logo images
// are all originally sized at 180 x 120 pixels, with the logo text baseline
// located 74 pixels beneath the top of the image.
@@ -47,54 +44,6 @@ const int kSmallLogoHeight = 88;
// Used to pad text label height so it fits nicely in view.
const int kLabelPadding = 25;
-int GetSearchEngineLogo(const TemplateURL* template_url) {
- typedef std::map<SearchEngineType, int> LogoMap;
- static LogoMap type_to_logo;
- if (type_to_logo.empty()) {
- type_to_logo.insert(std::make_pair<SearchEngineType, int>(
- TemplateURLPrepopulateData::SEARCH_ENGINE_GOOGLE,
- IDR_SEARCH_ENGINE_LOGO_GOOGLE));
- type_to_logo.insert(std::make_pair<SearchEngineType, int>(
- TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOO,
- IDR_SEARCH_ENGINE_LOGO_YAHOO));
- type_to_logo.insert(std::make_pair<SearchEngineType, int>(
- TemplateURLPrepopulateData::SEARCH_ENGINE_YAHOOJP,
- IDR_SEARCH_ENGINE_LOGO_YAHOOJP));
- type_to_logo.insert(std::make_pair<SearchEngineType, int>(
- TemplateURLPrepopulateData::SEARCH_ENGINE_BING,
- IDR_SEARCH_ENGINE_LOGO_BING));
- type_to_logo.insert(std::make_pair<SearchEngineType, int>(
- TemplateURLPrepopulateData::SEARCH_ENGINE_ASK,
- IDR_SEARCH_ENGINE_LOGO_ASK));
- type_to_logo.insert(std::make_pair<SearchEngineType, int>(
- TemplateURLPrepopulateData::SEARCH_ENGINE_YANDEX,
- IDR_SEARCH_ENGINE_LOGO_YANDEX));
- type_to_logo.insert(std::make_pair<SearchEngineType, int>(
- TemplateURLPrepopulateData::SEARCH_ENGINE_SEZNAM,
- IDR_SEARCH_ENGINE_LOGO_SEZNAM));
- type_to_logo.insert(std::make_pair<SearchEngineType, int>(
- TemplateURLPrepopulateData::SEARCH_ENGINE_CENTRUM,
- IDR_SEARCH_ENGINE_LOGO_CENTRUMCZ));
- type_to_logo.insert(std::make_pair<SearchEngineType, int>(
- TemplateURLPrepopulateData::SEARCH_ENGINE_NETSPRINT,
- IDR_SEARCH_ENGINE_LOGO_NETSPRINT));
- type_to_logo.insert(std::make_pair<SearchEngineType, int>(
- TemplateURLPrepopulateData::SEARCH_ENGINE_VIRGILIO,
- IDR_SEARCH_ENGINE_LOGO_VIRGILIO));
- type_to_logo.insert(std::make_pair<SearchEngineType, int>(
- TemplateURLPrepopulateData::SEARCH_ENGINE_MAILRU,
- IDR_SEARCH_ENGINE_LOGO_MAILRU));
- }
-
- LogoMap::iterator logo = type_to_logo.find(
- TemplateURLPrepopulateData::GetSearchEngineType(template_url));
- if (logo != type_to_logo.end())
- return logo->second;
-
- // Logo does not exist:
- return kNoLogo;
-}
-
} // namespace
SearchEngineChoice::SearchEngineChoice(views::ButtonListener* listener,
@@ -107,8 +56,8 @@ SearchEngineChoice::SearchEngineChoice(views::ButtonListener* listener,
#if defined(GOOGLE_CHROME_BUILD)
use_images = true;
#endif
- int logo_id = GetSearchEngineLogo(search_engine_);
- if (use_images && logo_id != kNoLogo) {
+ int logo_id = search_engine_->logo_id();
+ if (use_images && logo_id > 0) {
is_image_label_ = true;
views::ImageView* logo_image = new views::ImageView();
SkBitmap* logo_bmp =