diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-15 00:54:38 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-15 00:54:38 +0000 |
commit | 0c66c98b2d59bd69e38722792e4331646ffc96b3 (patch) | |
tree | 64a5d352c8b61dacccf9955729527b8f334ddec5 | |
parent | aa212dba7c8d69986c797f6a383f79fcec09b248 (diff) | |
download | chromium_src-0c66c98b2d59bd69e38722792e4331646ffc96b3.zip chromium_src-0c66c98b2d59bd69e38722792e4331646ffc96b3.tar.gz chromium_src-0c66c98b2d59bd69e38722792e4331646ffc96b3.tar.bz2 |
Revert 167793 - Moving prepopulated search engines to a JSON file.
This CL also includes the python script required to convert the JSON file to a .cc/.h pair. The generated .cc/.h are not generated by the build process and must be committed to the repository.
BUG=159990
Review URL: https://chromiumcodereview.appspot.com/11377049
TBR=beaudoin@chromium.org
Compiler errors:
http://build.chromium.org/p/chromium.chromiumos/buildstatus?builder=Linux%20ChromiumOS%20Builder&number=28409
http://build.chromium.org/p/chromium.win/buildstatus?builder=Win%20Builder%20%28dbg%29&number=4778
Review URL: https://codereview.chromium.org/11293291
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167796 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/json_to_struct.gypi | 48 | ||||
-rw-r--r-- | chrome/browser/search_engines/prepopulated_engines.gyp | 24 | ||||
-rw-r--r-- | chrome/browser/search_engines/prepopulated_engines.json | 1724 | ||||
-rw-r--r-- | chrome/browser/search_engines/prepopulated_engines_schema.json | 63 | ||||
-rw-r--r-- | chrome/browser/search_engines/template_url_prepopulate_data.cc | 2438 | ||||
-rw-r--r-- | chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc | 37 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 1 | ||||
-rw-r--r-- | tools/json_to_struct/PRESUBMIT.py | 20 | ||||
-rw-r--r-- | tools/json_to_struct/element_generator.py | 121 | ||||
-rwxr-xr-x | tools/json_to_struct/element_generator_test.py | 158 | ||||
-rwxr-xr-x | tools/json_to_struct/json_to_struct.py | 199 | ||||
-rw-r--r-- | tools/json_to_struct/struct_generator.py | 43 | ||||
-rwxr-xr-x | tools/json_to_struct/struct_generator_test.py | 58 |
13 files changed, 2429 insertions, 2505 deletions
diff --git a/build/json_to_struct.gypi b/build/json_to_struct.gypi deleted file mode 100644 index 17b0ba47..0000000 --- a/build/json_to_struct.gypi +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - # When including this gypi, the following variables must be set: - # schema_file: a json file that comprise the structure model. - # namespace: the C++ namespace that all generated files go under - # cc_dir: path to generated files - # Functions and namespaces can be excluded by setting "nocompile" to true. - 'struct_gen_dir': '<(DEPTH)/tools/json_to_struct', - 'struct_gen': '<(struct_gen_dir)/json_to_struct.py', - }, - 'rules': [ - { - 'rule_name': 'genstaticinit', - 'extension': 'json', - 'inputs': [ - '<(struct_gen_dir)/element_generator.py', - '<(struct_gen_dir)/json_to_struct.py', - '<(struct_gen_dir)/struct_generator.py', - '<(schema_file)', - ], - 'outputs': [ - '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).cc', - '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).h', - ], - 'action': [ - 'python', - '<(struct_gen)', - '<(RULE_INPUT_PATH)', - '--destdir=<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)', - '--namespace=<(namespace)', - '--schema=<(schema_file)', - ], - 'message': 'Generating C++ static initializers from <(RULE_INPUT_PATH)', - 'process_outputs_as_sources': 1, - }, - ], - 'include_dirs': [ - '<(SHARED_INTERMEDIATE_DIR)', - '<(DEPTH)', - ], - # This target exports a hard dependency because it generates header - # files. - 'hard_dependency': 1, -} diff --git a/chrome/browser/search_engines/prepopulated_engines.gyp b/chrome/browser/search_engines/prepopulated_engines.gyp deleted file mode 100644 index 5a3da5f..0000000 --- a/chrome/browser/search_engines/prepopulated_engines.gyp +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'prepopulated_engines', - 'type': 'static_library', - 'sources': [ - 'prepopulated_engines.json', - ], - 'includes': [ - '../../../build/json_to_struct.gypi', - ], - 'variables': { - 'chromium_code': 1, - 'schema_file': 'prepopulated_engines_schema.json', - 'namespace': 'TemplateURLPrepopulateData', - 'cc_dir': 'chrome/browser/search_engines', - }, - }, - ], -} diff --git a/chrome/browser/search_engines/prepopulated_engines.json b/chrome/browser/search_engines/prepopulated_engines.json deleted file mode 100644 index adffce4..0000000 --- a/chrome/browser/search_engines/prepopulated_engines.json +++ /dev/null @@ -1,1724 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This file is used during build to generate prepopulated_engine.h/cc. -// For more details see tools/json_to_struct/json_to_struct.py. - -// Engine definitions. See prepopulated_engines_schema.json for the field -// definitions. - -// The following unique IDs are available: -// 53, 56, 58, 60, 61, 64, 65, 66, 70, 74, 78, 79, 80, 81, 84, 86, 88, 91, -// 92, 93, 94, 95, 96, 97, 98, 99, 102+ -// -// IDs > 1000 are reserved for distribution custom engines. -// -// NOTES: -// - CHANGE THE ABOVE NUMBERS IF YOU ADD A NEW ENGINE; ID conflicts = bad! -// - Make sure you update the int_variables below as required. - -{ - "int_variables": { - // The following id is for UMA stats only. Please update it if you add new - // engines outside the current range or it will not be counted in stats. - "kMaxPrepopulatedEngineID": 101, - - // Increment this if you change the data in ways that mean users with - // existing data should get a new version. - "kCurrentDataVersion": 46 - }, - - // The following engines are included in country lists and are added to the - // list of search engines on the first run depending on user's country. - "elements": { - "abcsok": { - "name": "ABC S\u00f8k", - "keyword": "abcsok.no", - "favicon_url": "http://abcsok.no/favicon.ico", - "search_url": "http://abcsok.no/index.html?q={searchTerms}", - "type": "SEARCH_ENGINE_ABCSOK", - "id": 72 - }, - - "altavista": { - "name": "AltaVista", - "keyword": "altavista.com", - "favicon_url": "http://www.altavista.com/favicon.ico", - "search_url": "http://www.altavista.com/web/results?q={searchTerms}", - "type": "SEARCH_ENGINE_ALTAVISTA", - "id": 89 - }, - - "altavista_ar": { - "name": "AltaVista", - "keyword": "ar.altavista.com", - "favicon_url": "http://ar.altavista.com/favicon.ico", - "search_url": "http://ar.altavista.com/web/results?q={searchTerms}", - "type": "SEARCH_ENGINE_ALTAVISTA", - "id": 89 - }, - - "altavista_se": { - "name": "AltaVista", - "keyword": "se.altavista.com", - "favicon_url": "http://se.altavista.com/favicon.ico", - "search_url": "http://se.altavista.com/web/results?q={searchTerms}", - "type": "SEARCH_ENGINE_ALTAVISTA", - "id": 89 - }, - - "aol": { - "name": "AOL", - "keyword": "aol.com", - "favicon_url": "http://search.aol.com/favicon.ico", - "search_url": "http://search.aol.com/aol/search?query={searchTerms}", - "id": 35 - }, - - "araby": { - "name": "\u0639\u0631\u0628\u064a", - "keyword": "araby.com", - "favicon_url": "http://araby.com/favicon.ico", - "search_url": "http://araby.com/?q={searchTerms}", - "id": 12 - }, - - "ask": { - "name": "Ask", - "keyword": "ask.com", - "favicon_url": "http://www.ask.com/favicon.ico", - "search_url": "http://www.ask.com/web?q={searchTerms}", - "suggest_url": "http://ss.ask.com/query?q={searchTerms}&li=ff", - "type": "SEARCH_ENGINE_ASK", - "id": 4 - }, - - "ask_de": { - "name": "Ask.com Deutschland", - "keyword": "de.ask.com", - "favicon_url": "http://de.ask.com/favicon.ico", - "search_url": "http://de.ask.com/web?q={searchTerms}", - "suggest_url": "http://ss.de.ask.com/query?q={searchTerms}&li=ff", - "type": "SEARCH_ENGINE_ASK", - "id": 4 - }, - - "ask_es": { - "name": "Ask.com Espa\u00f1a", - "keyword": "es.ask.com", - "favicon_url": "http://es.ask.com/favicon.ico", - "search_url": "http://es.ask.com/web?q={searchTerms}", - "suggest_url": "http://ss.es.ask.com/query?q={searchTerms}&li=ff", - "type": "SEARCH_ENGINE_ASK", - "id": 4 - }, - - "ask_it": { - "name": "Ask.com Italia", - "keyword": "it.ask.com", - "favicon_url": "http://it.ask.com/favicon.ico", - "search_url": "http://it.ask.com/web?q={searchTerms}", - "suggest_url": "http://ss.it.ask.com/query?q={searchTerms}&li=ff", - "type": "SEARCH_ENGINE_ASK", - "id": 4 - }, - - "ask_nl": { - "name": "Ask.com Nederland", - "keyword": "nl.ask.com", - "favicon_url": "http://nl.ask.com/favicon.ico", - "search_url": "http://nl.ask.com/web?q={searchTerms}", - "suggest_url": "http://ss.nl.ask.com/query?q={searchTerms}&li=ff", - "type": "SEARCH_ENGINE_ASK", - "id": 4 - }, - - "ask_uk": { - "name": "Ask Jeeves", - "keyword": "uk.ask.com", - "favicon_url": "http://uk.ask.com/favicon.ico", - "search_url": "http://uk.ask.com/web?q={searchTerms}", - "suggest_url": "http://ss.uk.ask.com/query?q={searchTerms}&li=ff", - "type": "SEARCH_ENGINE_ASK", - "id": 4 - }, - - "atlas_cz": { - "name": "Atlas", - "keyword": "atlas.cz", - "favicon_url": "http://img.atlas.cz/favicon.ico", - "search_url": "http://search.atlas.cz/?q={searchTerms}", - "encoding": "windows-1250", - "id": 27 - }, - - "atlas_sk": { - "name": "ATLAS.SK", - "keyword": "atlas.sk", - "favicon_url": "http://www.atlas.sk/images/favicon.ico", - "search_url": "http://hladaj.atlas.sk/fulltext/?phrase={searchTerms}", - "id": 27 - }, - - "baidu": { - "name": "\u767e\u5ea6", - "keyword": "baidu.com", - "favicon_url": "http://www.baidu.com/favicon.ico", - "search_url": "http://www.baidu.com/s?wd={searchTerms}", - "encoding": "GB2312", - "type": "SEARCH_ENGINE_BAIDU", - "id": 21 - }, - - "bing": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_ar_XA": { - "name": "Bing", - "keyword": "bing.com_", // bing.com is taken by bing_en_XA. - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=ar-XA&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 7 // Can't be 3 as this has to appear in the Arabian countries' - // lists alongside bing_en_XA. - }, - - "bing_bg_BG": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=bg-BG&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_cs_CZ": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=cs-CZ&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_da_DK": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=da-DK&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_de_AT": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=de-AT&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_de_CH": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=de-CH&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_de_DE": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=de-DE&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_el_GR": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=el-GR&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_en_AU": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=en-AU&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_en_CA": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=en-CA&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_en_GB": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=en-GB&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_en_ID": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=en-ID&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_en_IE": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=en-IE&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_en_IN": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=en-IN&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_en_MY": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=en-MY&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_en_NZ": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=en-NZ&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_en_PH": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=en-PH&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_en_SG": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=en-SG&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_en_US": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=en-US&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_en_XA": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=en-XA&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_en_ZA": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=en-ZA&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_es_AR": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=es-AR&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_es_CL": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=es-CL&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_es_ES": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=es-ES&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_es_MX": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=es-MX&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_es_XL": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=es-XL&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_et_EE": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=et-EE&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_fi_FI": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=fi-FI&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_fr_BE": { - "name": "Bing", - "keyword": "bing.com_", // bing.com is taken by bing_nl_BE. - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=fr-BE&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 7 - }, - - "bing_fr_CA": { - "name": "Bing", - "keyword": "bing.com_", // bing.com is taken by bing_en_CA. - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=fr-CA&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 7 - }, - - "bing_fr_CH": { - "name": "Bing", - "keyword": "bing.com_", // bing.com is taken by bing_de_CH. - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=fr-CH&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 7 - }, - - "bing_fr_FR": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=fr-FR&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_he_IL": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=he-IL&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_hr_HR": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=hr-HR&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_hu_HU": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=hu-HU&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_it_IT": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=it-IT&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_ja_JP": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=ja-JP&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_ko_KR": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=ko-KR&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_lt_LT": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=lt-LT&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_lv_LV": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=lv-LV&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_nb_NO": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=nb-NO&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_nl_BE": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=nl-BE&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_nl_NL": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=nl-NL&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_pl_PL": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=pl-PL&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_pt_BR": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=pt-BR&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_pt_PT": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=pt-PT&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_ro_RO": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=ro-RO&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_ru_RU": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=ru-RU&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_sl_SI": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=sl-SI&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_sk_SK": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=sk-SK&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_sv_SE": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=sv-SE&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_th_TH": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=th-TH&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_tr_TR": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=tr-TR&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_uk_UA": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=uk-UA&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_zh_CN": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=zh-CN&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_zh_HK": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=zh-HK&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "bing_zh_TW": { - "name": "Bing", - "keyword": "bing.com", - "favicon_url": "http://www.bing.com/s/wlflag.ico", - "search_url": "http://www.bing.com/search?setmkt=zh-TW&q={searchTerms}", - "suggest_url": "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", - "type": "SEARCH_ENGINE_BING", - "id": 3 - }, - - "centrum_cz": { - "name": "Centrum.cz", - "keyword": "centrum.cz", - "favicon_url": "http://img.centrum.cz/6/vy2/o/favicon.ico", - "search_url": "http://search.centrum.cz/index.php?charset={inputEncoding}&q={searchTerms}", - "type": "SEARCH_ENGINE_CENTRUM", - "id": 26 - }, - - "centrum_sk": { - "name": "Centrum.sk", - "keyword": "centrum.sk", - "favicon_url": "http://img.centrum.sk/4/favicon.ico", - "search_url": "http://search.centrum.sk/index.php?charset={inputEncoding}&q={searchTerms}", - "type": "SEARCH_ENGINE_CENTRUM", - "id": 26 - }, - - "daum": { - "name": "Daum", - "keyword": "daum.net", - "favicon_url": "http://icon.daum-img.net/favicon.ico", - "search_url": "http://search.daum.net/search?q={searchTerms}", - "suggest_url": "http://sug.search.daum.net/search_nsuggest?mod=fxjson&code=utf_in_out&q={searchTerms}", - "type": "SEARCH_ENGINE_DAUM", - "id": 68 - }, - - "delfi_lt": { - "name": "DELFI", - "keyword": "delfi.lt", - "favicon_url": "http://search.delfi.lt/img/favicon.png", - "search_url": "http://search.delfi.lt/search.php?q={searchTerms}", - "type": "SEARCH_ENGINE_DELFI", - "id": 45 - }, - - "delfi_lv": { - "name": "DELFI", - "keyword": "delfi.lv", - "favicon_url": "http://smart.delfi.lv/img/smart_search.png", - "search_url": "http://smart.delfi.lv/i.php?enc={inputEncoding}&q={searchTerms}", - "type": "SEARCH_ENGINE_DELFI", - "id": 45 - }, - - "diri": { - "name": "diri", - "keyword": "diri.bg", - "favicon_url": "http://i.dir.bg/diri/images/favicon.ico", - "search_url": "http://diri.bg/search.php?textfield={searchTerms}", - "encoding": "windows-1251", - "type": "SEARCH_ENGINE_DIRI", - "id": 32 - }, - - "eniro_fi": { - "name": "Eniro", - "keyword": "eniro.fi", - "favicon_url": "http://eniro.fi/favicon.ico", - "search_url": "http://eniro.fi/query?search_word={searchTerms}&what=web_local", - "encoding": "ISO-8859-1", - "id": 29 - }, - - "eniro_se": { - "name": "Eniro", - "keyword": "eniro.se", - "favicon_url": "http://eniro.se/favicon.ico", - "search_url": "http://eniro.se/query?search_word={searchTerms}&what=web_local", - "encoding": "ISO-8859-1", - "id": 29 - }, - - "fonecta_02_fi": { - "name": "Fonecta 02.fi", - "keyword": "www.fi", - "favicon_url": "http://www.02.fi/img/favicon.ico", - "search_url": "http://www.02.fi/haku/{searchTerms}", - "id": 46 - }, - - "goo": { - "name": "goo", - "keyword": "search.goo.ne.jp", - "favicon_url": "http://goo.ne.jp/favicon.ico", - "search_url": "http://search.goo.ne.jp/web.jsp?MT={searchTerms}&IE={inputEncoding}", - "type": "SEARCH_ENGINE_GOO", - "id": 23 - }, - - "google": { - "name": "Google", - "keyword": "google.com", - "favicon_url": "http://www.google.com/favicon.ico", - "search_url": "{google:baseURL}search?q={searchTerms}&{google:RLZ}{google:acceptedSuggestion}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}sourceid=chrome&ie={inputEncoding}", - "suggest_url": "{google:baseSuggestURL}search?{google:searchFieldtrialParameter}client=chrome&q={searchTerms}&sugkey={google:suggestAPIKeyParameter}", - "instant_url": "{google:baseURL}webhp?sourceid=chrome-instant&{google:RLZ}{google:instantEnabledParameter}ie={inputEncoding}", - "alternate_urls": [ - "{google:baseURL}#q={searchTerms}", - "{google:baseURL}search#q={searchTerms}", - "{google:baseURL}webhp#q={searchTerms}" - ], - "type": "SEARCH_ENGINE_GOOGLE", - "id": 1 - }, - - "guruji": { - "name": "guruji", - "keyword": "guruji.com", - "favicon_url": "http://guruji.com/favicon.ico", - "search_url": "http://guruji.com/search?q={searchTerms}", - "id": 38 - }, - - "hispavista": { - "name": "hispavista", - "keyword": "hispavista.com", - "favicon_url": "http://buscar.hispavista.com/favicon.ico", - "search_url": "http://buscar.hispavista.com/?cadena={searchTerms}", - "encoding": "iso-8859-1", - "id": 18 - }, - - "in": { - "name": "in.gr", - "keyword": "in.gr", - "favicon_url": "http://www.in.gr/favicon.ico", - "search_url": "http://find.in.gr/?qs={searchTerms}", - "encoding": "ISO-8859-7", - "type": "SEARCH_ENGINE_IN", - "id": 54 - }, - - "jabse": { - "name": "Jabse", - "keyword": "jabse.com", - "favicon_url": "http://www.jabse.com/favicon.ico", - "search_url": "http://www.jabse.com/searchmachine.php?query={searchTerms}", - "id": 19 - }, - - "jubii": { - "name": "Jubii", - "keyword": "jubii.dk", - "favicon_url": "http://search.jubii.dk/favicon_jubii.ico", - "search_url": "http://search.jubii.dk/cgi-bin/pursuit?query={searchTerms}", - "encoding": "ISO-8859-1", - "id": 28 - }, - - "kvasir": { - "name": "Kvasir", - "keyword": "kvasir.no", - "favicon_url": "http://www.kvasir.no/img/favicon.ico", - "search_url": "http://www.kvasir.no/nettsok/searchResult.html?searchExpr={searchTerms}", - "encoding": "ISO-8859-1", - "id": 73 - }, - - "latne": { - "name": "LATNE", - "keyword": "latne.lv", - "favicon_url": "http://latne.lv/favicon.ico", - "search_url": "http://latne.lv/siets.php?q={searchTerms}", - "id": 71 - }, - - "leit": { - "name": "leit.is", - "keyword": "leit.is", - "favicon_url": "http://leit.is/leit.ico", - "search_url": "http://leit.is/query.aspx?qt={searchTerms}", - "encoding": "ISO-8859-1", - "id": 59 - }, - - "libero": { - "name": "Libero", - "keyword": "libero.it", - "favicon_url": "http://arianna.libero.it/favicon.ico", - "search_url": "http://arianna.libero.it/search/abin/integrata.cgi?query={searchTerms}", - "encoding": "ISO-8859-1", - "id": 63 - }, - - "mail_ru": { - "name": "@MAIL.RU", - "keyword": "mail.ru", - "favicon_url": "http://img.go.mail.ru/favicon.ico", - "search_url": "http://go.mail.ru/search?q={searchTerms}", - "encoding": "windows-1251", - "suggest_url": "http://suggests.go.mail.ru/chrome?q={searchTerms}", - "type": "SEARCH_ENGINE_MAILRU", - "id": 83 - }, - - "maktoob": { - "name": "\u0645\u0643\u062a\u0648\u0628", - "keyword": "maktoob.com", - "favicon_url": "http://www.maktoob.com/favicon.ico", - "search_url": "http://www.maktoob.com/searchResult.php?q={searchTerms}", - "id": 13 - }, - - "masrawy": { - "name": "\u0645\u0635\u0631\u0627\u0648\u064a", - "keyword": "masrawy.com", - "favicon_url": "http://www.masrawy.com/new/images/masrawy.ico", - "search_url": "http://masrawy.com/new/search.aspx?sr={searchTerms}", - "encoding": "windows-1256", - "id": 14 - }, - - "mynet": { - "name": "MYNET", - "keyword": "mynet.com", - "favicon_url": "http://img.mynet.com/mynetfavori.ico", - "search_url": "http://arama.mynet.com/search.aspx?q={searchTerms}&pg=q", - "encoding": "windows-1254", - "id": 101 - }, - - "najdi": { - "name": "Najdi.si", - "keyword": "najdi.si", - "favicon_url": "http://www.najdi.si/master/favicon.ico", - "search_url": "http://www.najdi.si/search.jsp?q={searchTerms}", - "type": "SEARCH_ENGINE_NAJDI", - "id": 87 - }, - - "nate": { - "name": "\ub124\uc774\ud2b8\ub2f7\ucef4", - "keyword": "nate.com", - "favicon_url": "http://nate.search.empas.com/favicon.ico", - "search_url": "http://nate.search.empas.com/search/all.html?q={searchTerms}", - "encoding": "EUC-KR", - "id": 69 - }, - - "naver": { - "name": "\ub124\uc774\ubc84", - "keyword": "naver.com", - "favicon_url": "http://search.naver.com/favicon.ico", - "search_url": "http://search.naver.com/search.naver?ie={inputEncoding}&query={searchTerms}", - "suggest_url": "http://ac.search.naver.com/autocompl?m=s&ie={inputEncoding}&oe=utf-8&q={searchTerms}", - "type": "SEARCH_ENGINE_NAVER", - "id": 67 - }, - - "neti": { - "name": "NETI", - "keyword": "neti.ee", - "favicon_url": "http://www.neti.ee/favicon.ico", - "search_url": "http://www.neti.ee/cgi-bin/otsing?query={searchTerms}", - "encoding": "ISO-8859-1", - "type": "SEARCH_ENGINE_NETI", - "id": 44 - }, - - "netsprint": { - "name": "NetSprint", - "keyword": "netsprint.pl", - "favicon_url": "http://netsprint.pl/favicon.ico", - "search_url": "http://www.netsprint.pl/serwis/search?q={searchTerms}", - "type": "SEARCH_ENGINE_NETSPRINT", - "id": 30 - }, - - "nur_kz": { - "name": "NUR.KZ", - "keyword": "nur.kz", - "favicon_url": "http://www.nur.kz/favicon_kz.ico", - "search_url": "http://search.nur.kz/?encoding={inputEncoding}&query={searchTerms}", - "id": 20 - }, - - "ok": { - "name": "OK.hu", - "keyword": "ok.hu", - "favicon_url": "http://ok.hu/gfx/favicon.ico", - "search_url": "http://ok.hu/katalogus?q={searchTerms}", - "encoding": "ISO-8859-2", - "type": "SEARCH_ENGINE_OK", - "id": 6 - }, - - "onet": { - "name": "Onet.pl", - "keyword": "onet.pl", - "favicon_url": "http://szukaj.onet.pl/favicon.ico", - "search_url": "http://szukaj.onet.pl/query.html?qt={searchTerms}", - "encoding": "ISO-8859-2", - "id": 75 - }, - - "pogodak_rs": { - "name": "Pogodak!", - "keyword": "pogodak.rs", - "favicon_url": "http://www.pogodak.rs/favicon.ico", - "search_url": "http://www.pogodak.rs/search.jsp?q={searchTerms}", - "type": "SEARCH_ENGINE_POGODAK", - "id": 24 - }, - - "rambler": { - "name": "Rambler", - "keyword": "rambler.ru", - "favicon_url": "http://www.rambler.ru/favicon.ico", - "search_url": "http://www.rambler.ru/srch?words={searchTerms}", - "encoding": "windows-1251", - "type": "SEARCH_ENGINE_RAMBLER", - "id": 16 - }, - - "rediff": { - "name": "Rediff", - "keyword": "rediff.com", - "favicon_url": "http://search1.rediff.com/favicon.ico", - "search_url": "http://search1.rediff.com/dirsrch/default.asp?MT={searchTerms}", - "id": 37 - }, - - "rednano": { - "name": "Rednano", - "keyword": "rednano.sg", - "favicon_url": "http://rednano.sg/favicon.ico", - "search_url": "http://rednano.sg/sfe/lwi.action?querystring={searchTerms}", - "id": 41 - }, - - "sanook": { - "name": "\u0e2a\u0e19\u0e38\u0e01!", - "keyword": "sanook.com", - "favicon_url": "http://search.sanook.com/favicon.ico", - "search_url": "http://search.sanook.com/search.php?q={searchTerms}", - "type": "SEARCH_ENGINE_SANOOK", - "id": 100 - }, - - "sapo": { - "name": "SAPO", - "keyword": "sapo.pt", - "favicon_url": "http://imgs.sapo.pt/images/sapo.ico", - "search_url": "http://pesquisa.sapo.pt/?q={searchTerms}", - "suggest_url": "http://pesquisa.sapo.pt/livesapo?q={searchTerms}", - "type": "SEARCH_ENGINE_SAPO", - "id": 77 - }, - - "search_de_CH": { - "name": "search.ch", - "keyword": "search.ch", - "favicon_url": "http://www.search.ch/favicon.ico", - "search_url": "http://www.search.ch/index.de.html?q={searchTerms}", - "encoding": "ISO-8859-1", - "id": 51 - }, - - "search_fr_CH": { - "name": "search.ch", - "keyword": "search.ch_", // search.ch is taken by search_de_CH. - "favicon_url": "http://www.search.ch/favicon.ico", - "search_url": "http://www.search.ch/index.fr.html?q={searchTerms}", - "id": 22 - }, - - "seznam": { - "name": "Seznam", - "keyword": "seznam.cz", - "favicon_url": "http://1.im.cz/szn/img/favicon.ico", - "search_url": "http://search.seznam.cz/?q={searchTerms}", - "suggest_url": "http:///suggest.fulltext.seznam.cz/?dict=fulltext_ff&phrase={searchTerms}&encoding={inputEncoding}&response_encoding=utf-8", - "type": "SEARCH_ENGINE_SEZNAM", - "id": 25 - }, - - "terra_ar": { - "name": "Terra Argentina", - "keyword": "terra.com.ar", - "favicon_url": "http://buscar.terra.com.ar/favicon.ico", - "search_url": "http://buscar.terra.com.ar/Default.aspx?query={searchTerms}&source=Search", - "encoding": "ISO-8859-1", - "id": 90 - }, - - "terra_es": { - "name": "Terra", - "keyword": "terra.es", - "favicon_url": "http://buscador.terra.es/favicon.ico", - "search_url": "http://buscador.terra.es/Default.aspx?query={searchTerms}&source=Search", - "encoding": "ISO-8859-1", - "id": 90 - }, - - "tut": { - "name": "TUT.BY", - "keyword": "tut.by", - "favicon_url": "http://www.tut.by/favicon.ico", - "search_url": "http://search.tut.by/?query={searchTerms}", - "encoding": "windows-1251", - "type": "SEARCH_ENGINE_TUT", - "id": 17 - }, - - "uol": { - "name": "UOL Busca", - "keyword": "busca.uol.com.br", - "favicon_url": "http://busca.uol.com.br/favicon.ico", - "search_url": "http://busca.uol.com.br/www/index.html?q={searchTerms}", - "encoding": "ISO-8859-1", - "id": 82 - }, - - "virgilio": { - "name": "Virgilio", - "keyword": "virgilio.it", - "favicon_url": "http://ricerca.alice.it/favicon.ico", - "search_url": "http://ricerca.alice.it/ricerca?qs={searchTerms}", - "encoding": "ISO-8859-1", - "type": "SEARCH_ENGINE_VIRGILIO", - "id": 62 - }, - - "walla": { - "name": "\u05d5\u05d5\u05d0\u05dc\u05d4!", - "keyword": "walla.co.il", - "favicon_url": "http://www.walla.co.il/favicon.ico", - "search_url": "http://search.walla.co.il/?e=hew&q={searchTerms}", - "encoding": "windows-1255", - "type": "SEARCH_ENGINE_WALLA", - "id": 55 - }, - - "wp": { - "name": "Wirtualna Polska", - "keyword": "wp.pl", - "favicon_url": "http://szukaj.wp.pl/favicon.ico", - "search_url": "http://szukaj.wp.pl/szukaj.html?szukaj={searchTerms}", - "encoding": "ISO-8859-2", - "id": 76 - }, - - "yahoo": { - "name": "Yahoo!", - "keyword": "yahoo.com", - "favicon_url": "http://search.yahoo.com/favicon.ico", - "search_url": "http://search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://ff.search.yahoo.com/gossip?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - // For regional Yahoo variants without region-specific suggestion service, - // suggestion is disabled. For some of them, we might consider - // using a fallback (e.g. de for at/ch, ca or fr for qc, en for nl, no, hk). - "yahoo_ar": { - "name": "Yahoo! Argentina", - "keyword": "ar.yahoo.com", - "favicon_url": "http://ar.search.yahoo.com/favicon.ico", - "search_url": "http://ar.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://ar-sayt.ff.search.yahoo.com/gossip-ar-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_at": { - "name": "Yahoo! Suche", - "keyword": "at.yahoo.com", - "favicon_url": "http://at.search.yahoo.com/favicon.ico", - "search_url": "http://at.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_au": { - "name": "Yahoo!7", - "keyword": "au.yahoo.com", - "favicon_url": "http://au.search.yahoo.com/favicon.ico", - "search_url": "http://au.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://aue-sayt.ff.search.yahoo.com/gossip-au-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_br": { - "name": "Yahoo! Brasil", - "keyword": "br.yahoo.com", - "favicon_url": "http://br.search.yahoo.com/favicon.ico", - "search_url": "http://br.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://br-sayt.ff.search.yahoo.com/gossip-br-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_ca": { - "name": "Yahoo! Canada", - "keyword": "ca.yahoo.com", - "favicon_url": "http://ca.search.yahoo.com/favicon.ico", - "search_url": "http://ca.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://gossip.ca.yahoo.com/gossip-ca-sayt?output=fxjsonp&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_ch": { - "name": "Yahoo! Suche", - "keyword": "ch.yahoo.com", - "favicon_url": "http://ch.search.yahoo.com/favicon.ico", - "search_url": "http://ch.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_cl": { - "name": "Yahoo! Chile", - "keyword": "cl.yahoo.com", - "favicon_url": "http://cl.search.yahoo.com/favicon.ico", - "search_url": "http://cl.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://gossip.telemundo.yahoo.com/gossip-e1-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_cn": { - "name": "\u4e2d\u56fd\u96c5\u864e", - "keyword": "cn.yahoo.com", - "favicon_url": "http://search.cn.yahoo.com/favicon.ico", - "search_url": "http://search.cn.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "encoding": "GB2312", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_co": { - "name": "Yahoo! Colombia", - "keyword": "co.yahoo.com", - "favicon_url": "http://co.search.yahoo.com/favicon.ico", - "search_url": "http://co.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://gossip.telemundo.yahoo.com/gossip-e1-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_de": { - "name": "Yahoo! Deutschland", - "keyword": "de.yahoo.com", - "favicon_url": "http://de.search.yahoo.com/favicon.ico", - "search_url": "http://de.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://de-sayt.ff.search.yahoo.com/gossip-de-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_dk": { - "name": "Yahoo! Danmark", - "keyword": "dk.yahoo.com", - "favicon_url": "http://dk.search.yahoo.com/favicon.ico", - "search_url": "http://dk.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_es": { - "name": "Yahoo! Espa\u00f1a", - "keyword": "es.yahoo.com", - "favicon_url": "http://es.search.yahoo.com/favicon.ico", - "search_url": "http://es.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://es-sayt.ff.search.yahoo.com/gossip-es-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_fi": { - "name": "Yahoo!-haku", - "keyword": "fi.yahoo.com", - "favicon_url": "http://fi.search.yahoo.com/favicon.ico", - "search_url": "http://fi.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_fr": { - "name": "Yahoo! France", - "keyword": "fr.yahoo.com", - "favicon_url": "http://fr.search.yahoo.com/favicon.ico", - "search_url": "http://fr.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://fr-sayt.ff.search.yahoo.com/gossip-fr-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_hk": { - "name": "Yahoo! Hong Kong", - "keyword": "hk.yahoo.com", - "favicon_url": "http://hk.search.yahoo.com/favicon.ico", - "search_url": "http://hk.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_id": { - "name": "Yahoo! Indonesia", - "keyword": "id.yahoo.com", - "favicon_url": "http://id.search.yahoo.com/favicon.ico", - "search_url": "http://id.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://id-sayt.ff.search.yahoo.com/gossip-id-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_in": { - "name": "Yahoo! India", - "keyword": "in.yahoo.com", - "favicon_url": "http://in.search.yahoo.com/favicon.ico", - "search_url": "http://in.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://in-sayt.ff.search.yahoo.com/gossip-in-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_it": { - "name": "Yahoo! Italia", - "keyword": "it.yahoo.com", - "favicon_url": "http://it.search.yahoo.com/favicon.ico", - "search_url": "http://it.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://it-sayt.ff.search.yahoo.com/gossip-it-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_jp": { - "name": "Yahoo! JAPAN", - "keyword": "yahoo.co.jp", - "favicon_url": "http://search.yahoo.co.jp/favicon.ico", - "search_url": "http://search.yahoo.co.jp/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "type": "SEARCH_ENGINE_YAHOOJP", - "id": 2 - }, - - "yahoo_kr": { - "name": "\uc57c\ud6c4! \ucf54\ub9ac\uc544", - "keyword": "kr.yahoo.com", - "favicon_url": "http://kr.search.yahoo.com/favicon.ico", - "search_url": "http://kr.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://kr.atc.search.yahoo.com/atcx.php?property=main&ot=fxjson&ei=utf8&eo=utf8&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_malaysia": { - "name": "Yahoo! Malaysia", - "keyword": "malaysia.yahoo.com", - "favicon_url": "http://malaysia.search.yahoo.com/favicon.ico", - "search_url": "http://malaysia.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://my-sayt.ff.search.yahoo.com/gossip-my-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_mx": { - "name": "Yahoo! M\u00e9xico", - "keyword": "mx.yahoo.com", - "favicon_url": "http://mx.search.yahoo.com/favicon.ico", - "search_url": "http://mx.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://gossip.mx.yahoo.com/gossip-mx-sayt?output=fxjsonp&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_nl": { - "name": "Yahoo! Nederland", - "keyword": "nl.yahoo.com", - "favicon_url": "http://nl.search.yahoo.com/favicon.ico", - "search_url": "http://nl.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_no": { - "name": "Yahoo! Norge", - "keyword": "no.yahoo.com", - "favicon_url": "http://no.search.yahoo.com/favicon.ico", - "search_url": "http://no.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_nz": { - "name": "Yahoo!Xtra", - "keyword": "nz.yahoo.com", - "favicon_url": "http://nz.search.yahoo.com/favicon.ico", - "search_url": "http://nz.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://aue-sayt.ff.search.yahoo.com/gossip-nz-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_pe": { - "name": "Yahoo! Per\u00fa", - "keyword": "pe.yahoo.com", - "favicon_url": "http://pe.search.yahoo.com/favicon.ico", - "search_url": "http://pe.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://gossip.telemundo.yahoo.com/gossip-e1-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_ph": { - "name": "Yahoo! Philippines", - "keyword": "ph.yahoo.com", - "favicon_url": "http://ph.search.yahoo.com/favicon.ico", - "search_url": "http://ph.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://ph-sayt.ff.search.yahoo.com/gossip-ph-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_qc": { - "name": "Yahoo! Qu\u00e9bec", - "keyword": "qc.yahoo.com", - "favicon_url": "http://qc.search.yahoo.com/favicon.ico", - "search_url": "http://qc.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "type": "SEARCH_ENGINE_YAHOOQC", - "id": 5 // Can't be 2 as this has to appear in the Canada list alongside - // yahoo_ca. - }, - - "yahoo_ru": { - "name": "Yahoo! \u043f\u043e-\u0440\u0443\u0441\u0441\u043a\u0438", - "keyword": "ru.yahoo.com", - "favicon_url": "http://ru.search.yahoo.com/favicon.ico", - "search_url": "http://ru.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_se": { - "name": "Yahoo! Sverige", - "keyword": "se.yahoo.com", - "favicon_url": "http://se.search.yahoo.com/favicon.ico", - "search_url": "http://se.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_sg": { - "name": "Yahoo! Singapore", - "keyword": "sg.yahoo.com", - "favicon_url": "http://sg.search.yahoo.com/favicon.ico", - "search_url": "http://sg.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://sg-sayt.ff.search.yahoo.com/gossip-sg-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_th": { - "name": "Yahoo! \u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22", - "keyword": "th.yahoo.com", - "favicon_url": "http://th.search.yahoo.com/favicon.ico", - "search_url": "http://th.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://th-sayt.ff.search.yahoo.com/gossip-th-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_tw": { - "name": "Yahoo!\u5947\u6469", - "keyword": "tw.yahoo.com", - "favicon_url": "http://tw.search.yahoo.com/favicon.ico", - "search_url": "http://tw.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_uk": { - "name": "Yahoo! UK & Ireland", - "keyword": "uk.yahoo.com", - "favicon_url": "http://uk.search.yahoo.com/favicon.ico", - "search_url": "http://uk.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://uk-sayt.ff.search.yahoo.com/gossip-uk-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_ve": { - "name": "Yahoo! Venezuela", - "keyword": "ve.yahoo.com", - "favicon_url": "http://ve.search.yahoo.com/favicon.ico", - "search_url": "http://ve.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://gossip.telemundo.yahoo.com/gossip-e1-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yahoo_vn": { - "name": "Yahoo! Vi\u1ec7t Nam", - "keyword": "vn.yahoo.com", - "favicon_url": "http://vn.search.yahoo.com/favicon.ico", - "search_url": "http://vn.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", - "suggest_url": "http://vn-sayt.ff.search.yahoo.com/gossip-vn-sayt?output=fxjson&command={searchTerms}", - "type": "SEARCH_ENGINE_YAHOO", - "id": 2 - }, - - "yamli": { - "name": "Yamli", - "keyword": "yamli.com", - "favicon_url": "http://www.yamli.com/favicon.ico", - "search_url": "http://www.yamli.com/#q={searchTerms}", - "id": 11 - }, - - "yandex_ru": { - "name": "\u042f\u043d\u0434\u0435\u043a\u0441", - "keyword": "yandex.ru", - "favicon_url": "http://yandex.ru/favicon.ico", - "search_url": "http://yandex.ru/yandsearch?text={searchTerms}", - "suggest_url": "http://suggest.yandex.net/suggest-ff.cgi?part={searchTerms}", - "type": "SEARCH_ENGINE_YANDEX", - "id": 15 - }, - - "yandex_ua": { - "name": "\u042f\u043d\u0434\u0435\u043a\u0441", - "keyword": "yandex.ua", - "favicon_url": "http://yandex.ua/favicon.ico", - "search_url": "http://yandex.ua/yandsearch?text={searchTerms}", - "suggest_url": "http://suggest.yandex.net/suggest-ff.cgi?part={searchTerms}", - "type": "SEARCH_ENGINE_YANDEX", - "id": 15 - }, - - "zoznam": { - "name": "Zoznam", - "keyword": "zoznam.sk", - "favicon_url": "http://zoznam.sk/favicon.ico", - "search_url": "http://zoznam.sk/hladaj.fcgi?s={searchTerms}", - "encoding": "windows-1250", - "type": "SEARCH_ENGINE_ZOZNAM", - "id": 85 - }, - - - // UMA-only engines //////////////////////////////////////////////////////// - - // The following engines are not included in any of the country lists. They - // are listed in |kAllEngines|, however, so that GetEngineType can find them - // for UMA reporting purposes. - - "all_by": { - "name": "ALL.BY", - "keyword": "all.by", - "favicon_url": "http://all.by/favicon.ico", - "search_url": "http://www.all.by/cgi-bin/search.cgi?mode=by&query={searchTerms}", - "type": "SEARCH_ENGINE_ALL_BY", - "id": 33 - }, - - "aport": { - "name": "Aport", - "keyword": "aport.ru", - "favicon_url": "http://www.aport.ru/favicon.png", - "search_url": "http://www.aport.ru/search/?r={searchTerms}", - "type": "SEARCH_ENGINE_APORT", - "id": 34 - }, - - "avg": { - "name": "AVG Secure Search", - "keyword": "search.avg.com", - "favicon_url": "http://search.avg.com/favicon.ico", - "search_url": "http://search.avg.com/route/?q={searchTerms}&lng={language}", - "type": "SEARCH_ENGINE_AVG", - "id": 50 - }, - - "avg_i": { - "name": "AVG Secure Search", - "keyword": "isearch.avg.com", - "favicon_url": "http://isearch.avg.com/favicon.ico", - "search_url": "http://isearch.avg.com/search?q={searchTerms}&lng={language}", - "type": "SEARCH_ENGINE_AVG", - "id": 52 - }, - - "conduit": { - "name": "Conduit", - "keyword": "conduit.com", - "favicon_url": "http://search.conduit.com/favicon.ico", - "search_url": "http://search.conduit.com/Results.aspx?q={searchTerms}", - "type": "SEARCH_ENGINE_CONDUIT", - "id": 36 - }, - - "icq": { - "name": "ICQ", - "keyword": "icq.com", - "favicon_url": "http://www.icq.com/favicon.ico", - "search_url": "http://search.icq.com/search/results.php?q={searchTerms}", - "type": "SEARCH_ENGINE_ICQ", - "id": 39 - }, - - "meta_ua": { - "name": "Meta-Ukraine", - "keyword": "meta.ua", - "favicon_url": "http://meta.ua/favicon.ico", - "search_url": "http://meta.ua/search.asp?q={searchTerms}", - "type": "SEARCH_ENGINE_META_UA", - "id": 40 - }, - - "metabot_ru": { - "name": "Metabot", - "keyword": "metabot.ru", - "favicon_url": "http://www.metabot.ru/favicon.ico", - "search_url": "http://results.metabot.ru/?st={searchTerms}", - "type": "SEARCH_ENGINE_METABOT_RU", - "id": 42 - }, - - "nigma": { - "name": "Nigma", - "keyword": "nigma.ru", - "favicon_url": "http://nigma.ru/favicon.ico", - "search_url": "http://www.nigma.ru/?s={searchTerms}", - "type": "SEARCH_ENGINE_NIGMA", - "id": 43 - }, - - "qip": { - "name": "QIP", - "keyword": "qip.ru", - "favicon_url": "http://search.qip.ru/favicon.ico", - "search_url": "http://search.qip.ru/?query={searchTerms}", - "type": "SEARCH_ENGINE_QIP", - "id": 47 - }, - - "ukr_net": { - "name": "Ukr.net", - "keyword": "ukr.net", - "favicon_url": "http://search.ukr.net/i/favicon.ico", - "search_url": "http://search.ukr.net/google/search.php?q={searchTerms}", - "type": "SEARCH_ENGINE_UKR_NET", - "id": 48 - }, - - "webalta": { - "name": "Webalta", - "keyword": "webalta.ru", - "favicon_url": "http://webalta.ru/favicon.ico", - "search_url": "http://webalta.ru/search?q={searchTerms}", - "type": "SEARCH_ENGINE_WEBALTA", - "id": 49 - }, - - "yandex_tr": { - "name": "Yandex", - "keyword": "yandex.com.tr", - "favicon_url": "http://yandex.com.tr/favicon.ico", - "search_url": "http://yandex.com.tr/yandsearch?text={searchTerms}", - "suggest_url": "http://suggest.yandex.net/suggest-ff.cgi?part={searchTerms}", - "type": "SEARCH_ENGINE_YANDEX", - "id": 15 - } - } -} diff --git a/chrome/browser/search_engines/prepopulated_engines_schema.json b/chrome/browser/search_engines/prepopulated_engines_schema.json deleted file mode 100644 index 0838e22..0000000 --- a/chrome/browser/search_engines/prepopulated_engines_schema.json +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This file is used by json_to_struct.py to generate prepopulated_engine.h/cc. -// Any time you modify this file regenerate the .h/.cc. See -// prepopulated_engines.json for details. - -{ - "type_name": "PrepopulatedEngine", - "headers": [ - "chrome/browser/search_engines/search_engine_type.h" - ], - "schema": [ - { "field": "name", "type": "string16" }, - { "field": "keyword", "type": "string16" }, - { "field": "favicon_url", "type": "string" }, - { "field": "search_url", "type": "string" }, - { - "field": "encoding", - "type": "string", - "default": "UTF-8", - "optional": true - }, - // If omitted, this engine does not support suggestions. - { "field": "suggest_url", "type": "string", "optional": true }, - // If omitted, this engine does not support instant. - { "field": "instant_url", "type": "string", "optional": true }, - // A list of URL patterns that can be used, in addition to |search_url|, - // to extract search terms from a URL. - { - "field": "alternate_urls", - "type": "array", - "contents": { "type": "string" }, - "optional": true - }, - { - "field": "type", - "type": "enum", - "ctype": "SearchEngineType", - "default": "SEARCH_ENGINE_OTHER", - "optional": true - }, - // 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; - // the ID is used when modifying engine data in subsequent versions, so that - // we can find the "old" entry to update even when the name or URL changes. - // - // This ID must be "unique" within one country's prepopulated data, but two - // entries can share an ID if they represent the "same" engine (e.g. Yahoo! - // US vs. Yahoo! UK) and will not appear in the same user-visible data set. - // This facilitates changes like adding more specific per-country data in - // the future; in such a case the localized engines will transparently - // replace the previous, non-localized versions. For engines where we need - // two instances to appear for one country (e.g. Bing Search U.S. English - // and Spanish), we must use two different unique IDs (and different - // keywords). - // - // See prepopulated_engines.json for the list of available IDs. - { "field": "id", "type": "int" } - ] -} diff --git a/chrome/browser/search_engines/template_url_prepopulate_data.cc b/chrome/browser/search_engines/template_url_prepopulate_data.cc index 71eaa3d..ede5492 100644 --- a/chrome/browser/search_engines/template_url_prepopulate_data.cc +++ b/chrome/browser/search_engines/template_url_prepopulate_data.cc @@ -9,6 +9,7 @@ #endif #include "base/command_line.h" +#include "base/json/json_reader.h" #include "base/logging.h" #include "base/memory/scoped_vector.h" #include "base/string16.h" @@ -19,7 +20,6 @@ #include "chrome/browser/google/google_util.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/search_engines/prepopulated_engines.h" #include "chrome/browser/search_engines/search_engine_type.h" #include "chrome/browser/search_engines/search_terms_data.h" #include "chrome/browser/search_engines/template_url.h" @@ -38,11 +38,2414 @@ #include "base/mac/scoped_cftyperef.h" #endif -namespace TemplateURLPrepopulateData { +namespace { + +// NOTE: See comments in GetDataVersion() below! You should probably not change +// the data in this file without changing the result of that function! + +// Engine definitions ////////////////////////////////////////////////////////// + +struct PrepopulatedEngine { + const wchar_t* const name; + const wchar_t* const keyword; + const char* const favicon_url; // If NULL, there is no favicon. + const char* const search_url; + const char* const encoding; + const char* const suggest_url; // If NULL, this engine does not support + // suggestions. + const char* const instant_url; // If NULL, this engine does not support + // instant. + // A JSON array containing a list of URL patterns that can be used, in + // addition to |search_url|, to extract search terms from a URL. Can be NULL. + const char* const alternate_urls; + // SEARCH_ENGINE_OTHER if there is no matching type. + const SearchEngineType type; + // 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; + // the ID is used when modifying engine data in subsequent versions, so that + // we can find the "old" entry to update even when the name or URL changes. + // + // This ID must be "unique" within one country's prepopulated data, but two + // entries can share an ID if they represent the "same" engine (e.g. Yahoo! US + // vs. Yahoo! UK) and will not appear in the same user-visible data set. This + // facilitates changes like adding more specific per-country data in the + // future; in such a case the localized engines will transparently replace the + // previous, non-localized versions. For engines where we need two instances + // to appear for one country (e.g. Bing Search U.S. English and Spanish), we + // must use two different unique IDs (and different keywords). + // + // The following unique IDs are available: + // 53, 56, 58, 60, 61, 64, 65, 66, 70, 74, 78, 79, 80, 81, 84, 86, 88, 91, + // 92, 93, 94, 95, 96, 97, 98, 99, 102+ + // + // IDs > 1000 are reserved for distribution custom engines. + // + // NOTES: + // CHANGE THE ABOVE NUMBERS IF YOU ADD A NEW ENGINE; ID conflicts = bad! + // CHANGE kMaxPrepopulatedEngineID below if you add new engine outside + // of the current range or it will not be counted in stats. + const int id; +}; + +// Prepopulated engines //////////////////////////////////////////////////////// + +// The following engines are included in country lists and are added to the list +// of search engines on the first run depending on user's country. + +const PrepopulatedEngine abcsok = { + L"ABC S\x00f8k", + L"abcsok.no", + "http://abcsok.no/favicon.ico", + "http://abcsok.no/index.html?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_ABCSOK, + 72, +}; + +const PrepopulatedEngine altavista = { + L"AltaVista", + L"altavista.com", + "http://www.altavista.com/favicon.ico", + "http://www.altavista.com/web/results?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_ALTAVISTA, + 89, +}; + +const PrepopulatedEngine altavista_ar = { + L"AltaVista", + L"ar.altavista.com", + "http://ar.altavista.com/favicon.ico", + "http://ar.altavista.com/web/results?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_ALTAVISTA, + 89, +}; + +const PrepopulatedEngine altavista_se = { + L"AltaVista", + L"se.altavista.com", + "http://se.altavista.com/favicon.ico", + "http://se.altavista.com/web/results?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_ALTAVISTA, + 89, +}; + +const PrepopulatedEngine aol = { + L"AOL", + L"aol.com", + "http://search.aol.com/favicon.ico", + "http://search.aol.com/aol/search?query={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 35, +}; + +const PrepopulatedEngine araby = { + L"\x0639\x0631\x0628\x064a", + L"araby.com", + "http://araby.com/favicon.ico", + "http://araby.com/?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 12, +}; + +const PrepopulatedEngine ask = { + L"Ask", + L"ask.com", + "http://www.ask.com/favicon.ico", + "http://www.ask.com/web?q={searchTerms}", + "UTF-8", + "http://ss.ask.com/query?q={searchTerms}&li=ff", + NULL, + NULL, + SEARCH_ENGINE_ASK, + 4, +}; + +const PrepopulatedEngine ask_de = { + L"Ask.com Deutschland", + L"de.ask.com", + "http://de.ask.com/favicon.ico", + "http://de.ask.com/web?q={searchTerms}", + "UTF-8", + "http://ss.de.ask.com/query?q={searchTerms}&li=ff", + NULL, + NULL, + SEARCH_ENGINE_ASK, + 4, +}; + +const PrepopulatedEngine ask_es = { + L"Ask.com Espa" L"\x00f1" L"a", + L"es.ask.com", + "http://es.ask.com/favicon.ico", + "http://es.ask.com/web?q={searchTerms}", + "UTF-8", + "http://ss.es.ask.com/query?q={searchTerms}&li=ff", + NULL, + NULL, + SEARCH_ENGINE_ASK, + 4, +}; + +const PrepopulatedEngine ask_it = { + L"Ask.com Italia", + L"it.ask.com", + "http://it.ask.com/favicon.ico", + "http://it.ask.com/web?q={searchTerms}", + "UTF-8", + "http://ss.it.ask.com/query?q={searchTerms}&li=ff", + NULL, + NULL, + SEARCH_ENGINE_ASK, + 4, +}; + +const PrepopulatedEngine ask_nl = { + L"Ask.com Nederland", + L"nl.ask.com", + "http://nl.ask.com/favicon.ico", + "http://nl.ask.com/web?q={searchTerms}", + "UTF-8", + "http://ss.nl.ask.com/query?q={searchTerms}&li=ff", + NULL, + NULL, + SEARCH_ENGINE_ASK, + 4, +}; + +const PrepopulatedEngine ask_uk = { + L"Ask Jeeves", + L"uk.ask.com", + "http://uk.ask.com/favicon.ico", + "http://uk.ask.com/web?q={searchTerms}", + "UTF-8", + "http://ss.uk.ask.com/query?q={searchTerms}&li=ff", + NULL, + NULL, + SEARCH_ENGINE_ASK, + 4, +}; + +const PrepopulatedEngine atlas_cz = { + L"Atlas", + L"atlas.cz", + "http://img.atlas.cz/favicon.ico", + "http://search.atlas.cz/?q={searchTerms}", + "windows-1250", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 27, +}; + +const PrepopulatedEngine atlas_sk = { + L"ATLAS.SK", + L"atlas.sk", + "http://www.atlas.sk/images/favicon.ico", + "http://hladaj.atlas.sk/fulltext/?phrase={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 27, +}; + +const PrepopulatedEngine baidu = { + L"\x767e\x5ea6", + L"baidu.com", + "http://www.baidu.com/favicon.ico", + "http://www.baidu.com/s?wd={searchTerms}", + "GB2312", + NULL, + NULL, + NULL, + SEARCH_ENGINE_BAIDU, + 21, +}; + +const PrepopulatedEngine bing = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_ar_XA = { + L"Bing", + L"bing.com_", // bing.com is taken by bing_en_XA. + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=ar-XA&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 7, // Can't be 3 as this has to appear in the Arabian countries' lists + // alongside bing_en_XA. +}; + +const PrepopulatedEngine bing_bg_BG = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=bg-BG&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_cs_CZ = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=cs-CZ&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_da_DK = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=da-DK&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_de_AT = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=de-AT&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_de_CH = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=de-CH&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_de_DE = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=de-DE&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_el_GR = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=el-GR&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_en_AU = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=en-AU&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_en_CA = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=en-CA&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_en_GB = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=en-GB&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_en_ID = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=en-ID&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_en_IE = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=en-IE&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_en_IN = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=en-IN&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_en_MY = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=en-MY&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_en_NZ = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=en-NZ&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_en_PH = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=en-PH&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_en_SG = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=en-SG&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_en_US = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=en-US&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_en_XA = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=en-XA&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_en_ZA = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=en-ZA&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_es_AR = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=es-AR&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_es_CL = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=es-CL&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_es_ES = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=es-ES&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_es_MX = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=es-MX&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_es_XL = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=es-XL&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; -// NOTE: You should probably not change the data in this file without changing -// |kCurrentDataVersion| in prepopulated_engines.json. See comments in -// GetDataVersion() below! +const PrepopulatedEngine bing_et_EE = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=et-EE&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_fi_FI = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=fi-FI&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_fr_BE = { + L"Bing", + L"bing.com_", // bing.com is taken by bing_nl_BE. + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=fr-BE&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 7, +}; + +const PrepopulatedEngine bing_fr_CA = { + L"Bing", + L"bing.com_", // bing.com is taken by bing_en_CA. + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=fr-CA&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 7, +}; + +const PrepopulatedEngine bing_fr_CH = { + L"Bing", + L"bing.com_", // bing.com is taken by bing_de_CH. + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=fr-CH&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 7, +}; + +const PrepopulatedEngine bing_fr_FR = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=fr-FR&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_he_IL = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=he-IL&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_hr_HR = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=hr-HR&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_hu_HU = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=hu-HU&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_it_IT = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=it-IT&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_ja_JP = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=ja-JP&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_ko_KR = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=ko-KR&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_lt_LT = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=lt-LT&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_lv_LV = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=lv-LV&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_nb_NO = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=nb-NO&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_nl_BE = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=nl-BE&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_nl_NL = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=nl-NL&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_pl_PL = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=pl-PL&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_pt_BR = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=pt-BR&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_pt_PT = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=pt-PT&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_ro_RO = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=ro-RO&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_ru_RU = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=ru-RU&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_sl_SI = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=sl-SI&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_sk_SK = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=sk-SK&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_sv_SE = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=sv-SE&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_th_TH = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=th-TH&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_tr_TR = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=tr-TR&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_uk_UA = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=uk-UA&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_zh_CN = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=zh-CN&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_zh_HK = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=zh-HK&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine bing_zh_TW = { + L"Bing", + L"bing.com", + "http://www.bing.com/s/wlflag.ico", + "http://www.bing.com/search?setmkt=zh-TW&q={searchTerms}", + "UTF-8", + "http://api.bing.com/osjson.aspx?query={searchTerms}&language={language}", + NULL, + NULL, + SEARCH_ENGINE_BING, + 3, +}; + +const PrepopulatedEngine centrum_cz = { + L"Centrum.cz", + L"centrum.cz", + "http://img.centrum.cz/6/vy2/o/favicon.ico", + "http://search.centrum.cz/index.php?charset={inputEncoding}&q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_CENTRUM, + 26, +}; + +const PrepopulatedEngine centrum_sk = { + L"Centrum.sk", + L"centrum.sk", + "http://img.centrum.sk/4/favicon.ico", + "http://search.centrum.sk/index.php?charset={inputEncoding}&q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_CENTRUM, + 26, +}; + +const PrepopulatedEngine daum = { + L"Daum", + L"daum.net", + "http://icon.daum-img.net/favicon.ico", + "http://search.daum.net/search?q={searchTerms}", + "UTF-8", + "http://sug.search.daum.net/search_nsuggest?mod=fxjson&code=utf_in_out&" + "q={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_DAUM, + 68, +}; + +const PrepopulatedEngine delfi_lt = { + L"DELFI", + L"delfi.lt", + "http://search.delfi.lt/img/favicon.png", + "http://search.delfi.lt/search.php?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_DELFI, + 45, +}; + +const PrepopulatedEngine delfi_lv = { + L"DELFI", + L"delfi.lv", + "http://smart.delfi.lv/img/smart_search.png", + "http://smart.delfi.lv/i.php?enc={inputEncoding}&q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_DELFI, + 45, +}; + +const PrepopulatedEngine diri = { + L"diri", + L"diri.bg", + "http://i.dir.bg/diri/images/favicon.ico", + "http://diri.bg/search.php?textfield={searchTerms}", + "windows-1251", + NULL, + NULL, + NULL, + SEARCH_ENGINE_DIRI, + 32, +}; + +const PrepopulatedEngine eniro_fi = { + L"Eniro", + L"eniro.fi", + "http://eniro.fi/favicon.ico", + "http://eniro.fi/query?search_word={searchTerms}&what=web_local", + "ISO-8859-1", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 29, +}; + +const PrepopulatedEngine eniro_se = { + L"Eniro", + L"eniro.se", + "http://eniro.se/favicon.ico", + "http://eniro.se/query?search_word={searchTerms}&what=web_local", + "ISO-8859-1", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 29, +}; + +const PrepopulatedEngine fonecta_02_fi = { + L"Fonecta 02.fi", + L"www.fi", + "http://www.02.fi/img/favicon.ico", + "http://www.02.fi/haku/{searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 46, +}; + +const PrepopulatedEngine goo = { + L"goo", + L"search.goo.ne.jp", + "http://goo.ne.jp/favicon.ico", + "http://search.goo.ne.jp/web.jsp?MT={searchTerms}&IE={inputEncoding}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_GOO, + 23, +}; + +const PrepopulatedEngine google = { + L"Google", + L"google.com", // This will be dynamically updated by the TemplateURL system. + "http://www.google.com/favicon.ico", + "{google:baseURL}search?q={searchTerms}&{google:RLZ}" + "{google:acceptedSuggestion}{google:originalQueryForSuggestion}" + "{google:assistedQueryStats}{google:searchFieldtrialParameter}" + "sourceid=chrome&ie={inputEncoding}", + "UTF-8", + "{google:baseSuggestURL}search?{google:searchFieldtrialParameter}" + "client=chrome&q={searchTerms}&sugkey={google:suggestAPIKeyParameter}", + "{google:baseURL}webhp?sourceid=chrome-instant&{google:RLZ}" + "{google:instantEnabledParameter}ie={inputEncoding}", + "[\"{google:baseURL}#q={searchTerms}\", " + "\"{google:baseURL}search#q={searchTerms}\", " + "\"{google:baseURL}webhp#q={searchTerms}\"]", + SEARCH_ENGINE_GOOGLE, + 1, +}; + +const PrepopulatedEngine guruji = { + L"guruji", + L"guruji.com", + "http://guruji.com/favicon.ico", + "http://guruji.com/search?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 38, +}; + +const PrepopulatedEngine hispavista = { + L"hispavista", + L"hispavista.com", + "http://buscar.hispavista.com/favicon.ico", + "http://buscar.hispavista.com/?cadena={searchTerms}", + "iso-8859-1", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 18, +}; + +const PrepopulatedEngine in = { + L"in.gr", + L"in.gr", + "http://www.in.gr/favicon.ico", + "http://find.in.gr/?qs={searchTerms}", + "ISO-8859-7", + NULL, + NULL, + NULL, + SEARCH_ENGINE_IN, + 54, +}; + +const PrepopulatedEngine jabse = { + L"Jabse", + L"jabse.com", + "http://www.jabse.com/favicon.ico", + "http://www.jabse.com/searchmachine.php?query={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 19, +}; + +const PrepopulatedEngine jubii = { + L"Jubii", + L"jubii.dk", + "http://search.jubii.dk/favicon_jubii.ico", + "http://search.jubii.dk/cgi-bin/pursuit?query={searchTerms}", + "ISO-8859-1", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 28, +}; + +const PrepopulatedEngine kvasir = { + L"Kvasir", + L"kvasir.no", + "http://www.kvasir.no/img/favicon.ico", + "http://www.kvasir.no/nettsok/searchResult.html?searchExpr={searchTerms}", + "ISO-8859-1", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 73, +}; + +const PrepopulatedEngine latne = { + L"LATNE", + L"latne.lv", + "http://latne.lv/favicon.ico", + "http://latne.lv/siets.php?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 71, +}; + +const PrepopulatedEngine leit = { + L"leit.is", + L"leit.is", + "http://leit.is/leit.ico", + "http://leit.is/query.aspx?qt={searchTerms}", + "ISO-8859-1", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 59, +}; + +const PrepopulatedEngine libero = { + L"Libero", + L"libero.it", + "http://arianna.libero.it/favicon.ico", + "http://arianna.libero.it/search/abin/integrata.cgi?query={searchTerms}", + "ISO-8859-1", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 63, +}; + +const PrepopulatedEngine mail_ru = { + L"@MAIL.RU", + L"mail.ru", + "http://img.go.mail.ru/favicon.ico", + "http://go.mail.ru/search?q={searchTerms}", + "windows-1251", + "http://suggests.go.mail.ru/chrome?q={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_MAILRU, + 83, +}; + +const PrepopulatedEngine maktoob = { + L"\x0645\x0643\x062a\x0648\x0628", + L"maktoob.com", + "http://www.maktoob.com/favicon.ico", + "http://www.maktoob.com/searchResult.php?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 13, +}; + +const PrepopulatedEngine masrawy = { + L"\x0645\x0635\x0631\x0627\x0648\x064a", + L"masrawy.com", + "http://www.masrawy.com/new/images/masrawy.ico", + "http://masrawy.com/new/search.aspx?sr={searchTerms}", + "windows-1256", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 14, +}; + +const PrepopulatedEngine mynet = { + L"MYNET", + L"mynet.com", + "http://img.mynet.com/mynetfavori.ico", + "http://arama.mynet.com/search.aspx?q={searchTerms}&pg=q", + "windows-1254", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 101, +}; + +const PrepopulatedEngine najdi = { + L"Najdi.si", + L"najdi.si", + "http://www.najdi.si/master/favicon.ico", + "http://www.najdi.si/search.jsp?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_NAJDI, + 87, +}; + +const PrepopulatedEngine nate = { + L"\xb124\xc774\xd2b8\xb2f7\xcef4", + L"nate.com", + "http://nate.search.empas.com/favicon.ico", + "http://nate.search.empas.com/search/all.html?q={searchTerms}", + "EUC-KR", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 69, +}; + +const PrepopulatedEngine naver = { + L"\xb124\xc774\xbc84", + L"naver.com", + "http://search.naver.com/favicon.ico", + "http://search.naver.com/search.naver?ie={inputEncoding}&query={searchTerms}", + "UTF-8", + "http://ac.search.naver.com/autocompl?m=s&ie={inputEncoding}&oe=utf-8&" + "q={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_NAVER, + 67, +}; + +const PrepopulatedEngine neti = { + L"NETI", + L"neti.ee", + "http://www.neti.ee/favicon.ico", + "http://www.neti.ee/cgi-bin/otsing?query={searchTerms}", + "ISO-8859-1", + NULL, + NULL, + NULL, + SEARCH_ENGINE_NETI, + 44, +}; + +const PrepopulatedEngine netsprint = { + L"NetSprint", + L"netsprint.pl", + "http://netsprint.pl/favicon.ico", + "http://www.netsprint.pl/serwis/search?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_NETSPRINT, + 30, +}; + +const PrepopulatedEngine nur_kz = { + L"NUR.KZ", + L"nur.kz", + "http://www.nur.kz/favicon_kz.ico", + "http://search.nur.kz/?encoding={inputEncoding}&query={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 20, +}; + +const PrepopulatedEngine ok = { + L"OK.hu", + L"ok.hu", + "http://ok.hu/gfx/favicon.ico", + "http://ok.hu/katalogus?q={searchTerms}", + "ISO-8859-2", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OK, + 6, +}; + +const PrepopulatedEngine onet = { + L"Onet.pl", + L"onet.pl", + "http://szukaj.onet.pl/favicon.ico", + "http://szukaj.onet.pl/query.html?qt={searchTerms}", + "ISO-8859-2", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 75, +}; + +const PrepopulatedEngine pogodak_rs = { + L"Pogodak!", + L"pogodak.rs", + "http://www.pogodak.rs/favicon.ico", + "http://www.pogodak.rs/search.jsp?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_POGODAK, + 24, +}; + +const PrepopulatedEngine rambler = { + L"Rambler", + L"rambler.ru", + "http://www.rambler.ru/favicon.ico", + "http://www.rambler.ru/srch?words={searchTerms}", + "windows-1251", + NULL, + NULL, + NULL, + SEARCH_ENGINE_RAMBLER, + 16, +}; + +const PrepopulatedEngine rediff = { + L"Rediff", + L"rediff.com", + "http://search1.rediff.com/favicon.ico", + "http://search1.rediff.com/dirsrch/default.asp?MT={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 37, +}; + +const PrepopulatedEngine rednano = { + L"Rednano", + L"rednano.sg", + "http://rednano.sg/favicon.ico", + "http://rednano.sg/sfe/lwi.action?querystring={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 41, +}; + +const PrepopulatedEngine sanook = { + L"\x0e2a\x0e19\x0e38\x0e01!", + L"sanook.com", + "http://search.sanook.com/favicon.ico", + "http://search.sanook.com/search.php?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_SANOOK, + 100, +}; + +const PrepopulatedEngine sapo = { + L"SAPO", + L"sapo.pt", + "http://imgs.sapo.pt/images/sapo.ico", + "http://pesquisa.sapo.pt/?q={searchTerms}", + "UTF-8", + "http://pesquisa.sapo.pt/livesapo?q={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_SAPO, + 77, +}; + +const PrepopulatedEngine search_de_CH = { + L"search.ch", + L"search.ch", + "http://www.search.ch/favicon.ico", + "http://www.search.ch/index.de.html?q={searchTerms}", + "ISO-8859-1", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 51, +}; + +const PrepopulatedEngine search_fr_CH = { + L"search.ch", + L"search.ch_", // search.ch is taken by search_de_CH. + "http://www.search.ch/favicon.ico", + "http://www.search.ch/index.fr.html?q={searchTerms}", + "ISO-8859-1", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 22, +}; + +const PrepopulatedEngine seznam = { + L"Seznam", + L"seznam.cz", + "http://1.im.cz/szn/img/favicon.ico", + "http://search.seznam.cz/?q={searchTerms}", + "UTF-8", + "http:///suggest.fulltext.seznam.cz/?dict=fulltext_ff&phrase={searchTerms}&" + "encoding={inputEncoding}&response_encoding=utf-8", + NULL, + NULL, + SEARCH_ENGINE_SEZNAM, + 25, +}; + +const PrepopulatedEngine terra_ar = { + L"Terra Argentina", + L"terra.com.ar", + "http://buscar.terra.com.ar/favicon.ico", + "http://buscar.terra.com.ar/Default.aspx?query={searchTerms}&source=Search", + "ISO-8859-1", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 90, +}; + +const PrepopulatedEngine terra_es = { + L"Terra", + L"terra.es", + "http://buscador.terra.es/favicon.ico", + "http://buscador.terra.es/Default.aspx?query={searchTerms}&source=Search", + "ISO-8859-1", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 90, +}; + +const PrepopulatedEngine tut = { + L"TUT.BY", + L"tut.by", + "http://www.tut.by/favicon.ico", + "http://search.tut.by/?query={searchTerms}", + "windows-1251", + NULL, + NULL, + NULL, + SEARCH_ENGINE_TUT, + 17, +}; + +const PrepopulatedEngine uol = { + L"UOL Busca", + L"busca.uol.com.br", + "http://busca.uol.com.br/favicon.ico", + "http://busca.uol.com.br/www/index.html?q={searchTerms}", + "ISO-8859-1", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 82, +}; + +const PrepopulatedEngine virgilio = { + L"Virgilio", + L"virgilio.it", + "http://ricerca.alice.it/favicon.ico", + "http://ricerca.alice.it/ricerca?qs={searchTerms}", + "ISO-8859-1", + NULL, + NULL, + NULL, + SEARCH_ENGINE_VIRGILIO, + 62, +}; + +const PrepopulatedEngine walla = { + L"\x05d5\x05d5\x05d0\x05dc\x05d4!", + L"walla.co.il", + "http://www.walla.co.il/favicon.ico", + "http://search.walla.co.il/?e=hew&q={searchTerms}", + "windows-1255", + NULL, + NULL, + NULL, + SEARCH_ENGINE_WALLA, + 55, +}; + +const PrepopulatedEngine wp = { + L"Wirtualna Polska", + L"wp.pl", + "http://szukaj.wp.pl/favicon.ico", + "http://szukaj.wp.pl/szukaj.html?szukaj={searchTerms}", + "ISO-8859-2", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 76, +}; + +const PrepopulatedEngine yahoo = { + L"Yahoo!", + L"yahoo.com", + "http://search.yahoo.com/favicon.ico", + "http://search.yahoo.com/search?ei={inputEncoding}&fr=crmas&p={searchTerms}", + "UTF-8", + "http://ff.search.yahoo.com/gossip?output=fxjson&command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +// For regional Yahoo variants without region-specific suggestion service, +// suggestion is disabled. For some of them, we might consider +// using a fallback (e.g. de for at/ch, ca or fr for qc, en for nl, no, hk). +const PrepopulatedEngine yahoo_ar = { + L"Yahoo! Argentina", + L"ar.yahoo.com", + "http://ar.search.yahoo.com/favicon.ico", + "http://ar.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://ar-sayt.ff.search.yahoo.com/gossip-ar-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_at = { + L"Yahoo! Suche", + L"at.yahoo.com", + "http://at.search.yahoo.com/favicon.ico", + "http://at.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_au = { + L"Yahoo!7", + L"au.yahoo.com", + "http://au.search.yahoo.com/favicon.ico", + "http://au.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://aue-sayt.ff.search.yahoo.com/gossip-au-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_br = { + L"Yahoo! Brasil", + L"br.yahoo.com", + "http://br.search.yahoo.com/favicon.ico", + "http://br.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://br-sayt.ff.search.yahoo.com/gossip-br-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_ca = { + L"Yahoo! Canada", + L"ca.yahoo.com", + "http://ca.search.yahoo.com/favicon.ico", + "http://ca.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://gossip.ca.yahoo.com/gossip-ca-sayt?output=fxjsonp&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_ch = { + L"Yahoo! Suche", + L"ch.yahoo.com", + "http://ch.search.yahoo.com/favicon.ico", + "http://ch.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_cl = { + L"Yahoo! Chile", + L"cl.yahoo.com", + "http://cl.search.yahoo.com/favicon.ico", + "http://cl.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://gossip.telemundo.yahoo.com/gossip-e1-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_cn = { + L"\x4e2d\x56fd\x96c5\x864e", + L"cn.yahoo.com", + "http://search.cn.yahoo.com/favicon.ico", + "http://search.cn.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "GB2312", + NULL, + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_co = { + L"Yahoo! Colombia", + L"co.yahoo.com", + "http://co.search.yahoo.com/favicon.ico", + "http://co.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://gossip.telemundo.yahoo.com/gossip-e1-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_de = { + L"Yahoo! Deutschland", + L"de.yahoo.com", + "http://de.search.yahoo.com/favicon.ico", + "http://de.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://de-sayt.ff.search.yahoo.com/gossip-de-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_dk = { + L"Yahoo! Danmark", + L"dk.yahoo.com", + "http://dk.search.yahoo.com/favicon.ico", + "http://dk.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_es = { + L"Yahoo! Espa" L"\x00f1" L"a", + L"es.yahoo.com", + "http://es.search.yahoo.com/favicon.ico", + "http://es.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://es-sayt.ff.search.yahoo.com/gossip-es-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_fi = { + L"Yahoo!-haku", + L"fi.yahoo.com", + "http://fi.search.yahoo.com/favicon.ico", + "http://fi.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_fr = { + L"Yahoo! France", + L"fr.yahoo.com", + "http://fr.search.yahoo.com/favicon.ico", + "http://fr.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://fr-sayt.ff.search.yahoo.com/gossip-fr-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_hk = { + L"Yahoo! Hong Kong", + L"hk.yahoo.com", + "http://hk.search.yahoo.com/favicon.ico", + "http://hk.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_id = { + L"Yahoo! Indonesia", + L"id.yahoo.com", + "http://id.search.yahoo.com/favicon.ico", + "http://id.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://id-sayt.ff.search.yahoo.com/gossip-id-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_in = { + L"Yahoo! India", + L"in.yahoo.com", + "http://in.search.yahoo.com/favicon.ico", + "http://in.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://in-sayt.ff.search.yahoo.com/gossip-in-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_it = { + L"Yahoo! Italia", + L"it.yahoo.com", + "http://it.search.yahoo.com/favicon.ico", + "http://it.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://it-sayt.ff.search.yahoo.com/gossip-it-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_jp = { + L"Yahoo! JAPAN", + L"yahoo.co.jp", + "http://search.yahoo.co.jp/favicon.ico", + "http://search.yahoo.co.jp/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_YAHOOJP, + 2, +}; + +const PrepopulatedEngine yahoo_kr = { + L"\xc57c\xd6c4! \xcf54\xb9ac\xc544", + L"kr.yahoo.com", + "http://kr.search.yahoo.com/favicon.ico", + "http://kr.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://kr.atc.search.yahoo.com/atcx.php?property=main&ot=fxjson&" + "ei=utf8&eo=utf8&command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_malaysia = { + L"Yahoo! Malaysia", + L"malaysia.yahoo.com", + "http://malaysia.search.yahoo.com/favicon.ico", + "http://malaysia.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://my-sayt.ff.search.yahoo.com/gossip-my-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_mx = { + L"Yahoo! M\x00e9xico", + L"mx.yahoo.com", + "http://mx.search.yahoo.com/favicon.ico", + "http://mx.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://gossip.mx.yahoo.com/gossip-mx-sayt?output=fxjsonp&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_nl = { + L"Yahoo! Nederland", + L"nl.yahoo.com", + "http://nl.search.yahoo.com/favicon.ico", + "http://nl.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_no = { + L"Yahoo! Norge", + L"no.yahoo.com", + "http://no.search.yahoo.com/favicon.ico", + "http://no.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_nz = { + L"Yahoo!Xtra", + L"nz.yahoo.com", + "http://nz.search.yahoo.com/favicon.ico", + "http://nz.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://aue-sayt.ff.search.yahoo.com/gossip-nz-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_pe = { + L"Yahoo! Per\x00fa", + L"pe.yahoo.com", + "http://pe.search.yahoo.com/favicon.ico", + "http://pe.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://gossip.telemundo.yahoo.com/gossip-e1-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_ph = { + L"Yahoo! Philippines", + L"ph.yahoo.com", + "http://ph.search.yahoo.com/favicon.ico", + "http://ph.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://ph-sayt.ff.search.yahoo.com/gossip-ph-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_qc = { + L"Yahoo! Qu" L"\x00e9" L"bec", + L"qc.yahoo.com", + "http://qc.search.yahoo.com/favicon.ico", + "http://qc.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_YAHOOQC, + 5, // Can't be 2 as this has to appear in the Canada list alongside yahoo_ca. +}; + +const PrepopulatedEngine yahoo_ru = { + L"Yahoo! \x043f\x043e-\x0440\x0443\x0441\x0441\x043a\x0438", + L"ru.yahoo.com", + "http://ru.search.yahoo.com/favicon.ico", + "http://ru.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_se = { + L"Yahoo! Sverige", + L"se.yahoo.com", + "http://se.search.yahoo.com/favicon.ico", + "http://se.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_sg = { + L"Yahoo! Singapore", + L"sg.yahoo.com", + "http://sg.search.yahoo.com/favicon.ico", + "http://sg.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://sg-sayt.ff.search.yahoo.com/gossip-sg-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_th = { + L"Yahoo! \x0e1b\x0e23\x0e30\x0e40\x0e17\x0e28\x0e44\x0e17\x0e22", + L"th.yahoo.com", + "http://th.search.yahoo.com/favicon.ico", + "http://th.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://th-sayt.ff.search.yahoo.com/gossip-th-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_tw = { + L"Yahoo!\x5947\x6469", + L"tw.yahoo.com", + "http://tw.search.yahoo.com/favicon.ico", + "http://tw.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_uk = { + L"Yahoo! UK & Ireland", + L"uk.yahoo.com", + "http://uk.search.yahoo.com/favicon.ico", + "http://uk.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://uk-sayt.ff.search.yahoo.com/gossip-uk-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_ve = { + L"Yahoo! Venezuela", + L"ve.yahoo.com", + "http://ve.search.yahoo.com/favicon.ico", + "http://ve.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://gossip.telemundo.yahoo.com/gossip-e1-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yahoo_vn = { + L"Yahoo! Vi\x1ec7t Nam", + L"vn.yahoo.com", + "http://vn.search.yahoo.com/favicon.ico", + "http://vn.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" + "p={searchTerms}", + "UTF-8", + "http://vn-sayt.ff.search.yahoo.com/gossip-vn-sayt?output=fxjson&" + "command={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YAHOO, + 2, +}; + +const PrepopulatedEngine yamli = { + L"Yamli", + L"yamli.com", + "http://www.yamli.com/favicon.ico", + "http://www.yamli.com/#q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_OTHER, + 11, +}; + +const PrepopulatedEngine yandex_ru = { + L"\x042f\x043d\x0434\x0435\x043a\x0441", + L"yandex.ru", + "http://yandex.ru/favicon.ico", + "http://yandex.ru/yandsearch?text={searchTerms}", + "UTF-8", + "http://suggest.yandex.net/suggest-ff.cgi?part={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YANDEX, + 15, +}; + +const PrepopulatedEngine yandex_ua = { + L"\x042f\x043d\x0434\x0435\x043a\x0441", + L"yandex.ua", + "http://yandex.ua/favicon.ico", + "http://yandex.ua/yandsearch?text={searchTerms}", + "UTF-8", + "http://suggest.yandex.net/suggest-ff.cgi?part={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YANDEX, + 15, +}; + +const PrepopulatedEngine zoznam = { + L"Zoznam", + L"zoznam.sk", + "http://zoznam.sk/favicon.ico", + "http://zoznam.sk/hladaj.fcgi?s={searchTerms}", + "windows-1250", + NULL, + NULL, + NULL, + SEARCH_ENGINE_ZOZNAM, + 85, +}; + +// UMA-only engines //////////////////////////////////////////////////////////// + +// The following engines are not included in any of the country lists. They +// are listed in |kAllEngines|, however, so that GetEngineType can find them +// for UMA reporting purposes. + +const PrepopulatedEngine all_by = { + L"ALL.BY", + L"all.by", + NULL, + "http://www.all.by/cgi-bin/search.cgi?mode=by&query={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_ALL_BY, + 33, +}; + +const PrepopulatedEngine aport = { + L"Aport", + L"aport.ru", + NULL, + "http://www.aport.ru/search/?r={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_APORT, + 34, +}; + +const PrepopulatedEngine avg = { + L"AVG Secure Search", + L"search.avg.com", + NULL, + "http://search.avg.com/route/?q={searchTerms}&lng={language}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_AVG, + 50, +}; + +const PrepopulatedEngine avg_i = { + L"AVG Secure Search", + L"isearch.avg.com", + NULL, + "http://isearch.avg.com/search?q={searchTerms}&lng={language}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_AVG, + 52, +}; + +const PrepopulatedEngine conduit = { + L"Conduit", + L"conduit.com", + NULL, + "http://search.conduit.com/Results.aspx?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_CONDUIT, + 36, +}; + +const PrepopulatedEngine icq = { + L"ICQ", + L"icq.com", + NULL, + "http://search.icq.com/search/results.php?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_ICQ, + 39, +}; + +const PrepopulatedEngine meta_ua = { + L"Meta-Ukraine", + L"meta.ua", + NULL, + "http://meta.ua/search.asp?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_META_UA, + 40, +}; + +const PrepopulatedEngine metabot_ru = { + L"Metabot", + L"metabot.ru", + NULL, + "http://results.metabot.ru/?st={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_METABOT_RU, + 42, +}; + +const PrepopulatedEngine nigma = { + L"Nigma", + L"nigma.ru", + NULL, + "http://www.nigma.ru/?s={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_NIGMA, + 43, +}; + +const PrepopulatedEngine qip = { + L"QIP", + L"qip.ru", + NULL, + "http://search.qip.ru/?query={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_QIP, + 47, +}; + +const PrepopulatedEngine ukr_net = { + L"Ukr.net", + L"ukr.net", + NULL, + "http://search.ukr.net/google/search.php?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_UKR_NET, + 48, +}; + +const PrepopulatedEngine webalta = { + L"Webalta", + L"webalta.ru", + NULL, + "http://webalta.ru/search?q={searchTerms}", + "UTF-8", + NULL, + NULL, + NULL, + SEARCH_ENGINE_WEBALTA, + 49, +}; + +const PrepopulatedEngine yandex_tr = { + L"Yandex", + L"yandex.com.tr", + "http://yandex.com.tr/favicon.ico", + "http://yandex.com.tr/yandsearch?text={searchTerms}", + "UTF-8", + "http://suggest.yandex.net/suggest-ff.cgi?part={searchTerms}", + NULL, + NULL, + SEARCH_ENGINE_YANDEX, + 15, +}; // Lists of engines per country //////////////////////////////////////////////// @@ -1080,6 +3483,14 @@ const LogoURLs google_logos = { //////////////////////////////////////////////////////////////////////////////// +} // namespace + +namespace TemplateURLPrepopulateData { + +// The following id is for UMA stats only. Please update +// kMaxPrepopulatedEngineID if it changes upwards. +const int kMaxPrepopulatedEngineID = 101; + void RegisterUserPrefs(PrefService* prefs) { prefs->RegisterIntegerPref(prefs::kCountryIDAtInstall, kCountryIDUnknown, @@ -1096,6 +3507,9 @@ void RegisterUserPrefs(PrefService* prefs) { } int GetDataVersion(PrefService* prefs) { + // Increment this if you change the above data in ways that mean users with + // existing data should get a new version. + const int kCurrentDataVersion = 46; // Allow tests to override the local version. return (prefs && prefs->HasPrefPath(prefs::kSearchProviderOverridesVersion)) ? prefs->GetInteger(prefs::kSearchProviderOverridesVersion) : @@ -1184,15 +3598,21 @@ TemplateURL* MakePrepopulatedTemplateURLFromPrepopulateEngine( Profile* profile, const PrepopulatedEngine& engine) { - ListValue alternate_urls; + // Use an empty list if there are no alternate_urls. + ListValue empty_list; + ListValue* alternate_urls = &empty_list; + // Will hold the result of |ReadToValue|, which we own. + scoped_ptr<Value> value; if (engine.alternate_urls) { - for (size_t i = 0; i < engine.alternate_urls_size; ++i) - alternate_urls.AppendString(std::string(engine.alternate_urls[i])); + base::JSONReader json_reader; + value.reset(json_reader.ReadToValue(std::string(engine.alternate_urls))); + DCHECK(value.get()); + value->GetAsList(&alternate_urls); } return MakePrepopulatedTemplateURL(profile, WideToUTF16(engine.name), WideToUTF16(engine.keyword), engine.search_url, engine.suggest_url, - engine.instant_url, alternate_urls, + engine.instant_url, *alternate_urls, engine.favicon_url, engine.encoding, engine.id); } 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 8911e50..324af6e 100644 --- a/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc +++ b/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/command_line.h" #include "base/file_util.h" #include "base/memory/scoped_vector.h" #include "base/scoped_temp_dir.h" @@ -11,7 +10,6 @@ #include "chrome/browser/search_engines/template_url.h" #include "chrome/browser/search_engines/template_url_service.h" #include "chrome/browser/search_engines/template_url_prepopulate_data.h" -#include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" @@ -179,41 +177,6 @@ TEST(TemplateURLPrepopulateDataTest, ProvidersFromPrefs) { EXPECT_EQ(2u, t_urls.size()); } -// Verifies that built-in search providers are processed correctly. -TEST(TemplateURLPrepopulateDataTest, ProvidersFromPrepopulated) { - // Use United States. - CommandLine::ForCurrentProcess()->AppendSwitchASCII( - switches::kCountry, "US"); - TestingProfile profile; - ScopedVector<TemplateURL> t_urls; - size_t default_index; - TemplateURLPrepopulateData::GetPrepopulatedEngines(&profile, &t_urls.get(), - &default_index); - - // Ensure all the URLs have the required fields populated. - ASSERT_FALSE(t_urls.empty()); - for (size_t i = 0; i < t_urls.size(); ++i) { - ASSERT_FALSE(t_urls[i]->short_name().empty()); - ASSERT_FALSE(t_urls[i]->keyword().empty()); - ASSERT_FALSE(t_urls[i]->favicon_url().host().empty()); - ASSERT_FALSE(t_urls[i]->url_ref().GetHost().empty()); - ASSERT_FALSE(t_urls[i]->input_encodings().empty()); - EXPECT_GT(t_urls[i]->prepopulate_id(), 0); - } - - // Ensures the default URL is Google and has the optional fields filled. - EXPECT_EQ(ASCIIToUTF16("Google"), t_urls[default_index]->short_name()); - EXPECT_FALSE(t_urls[default_index]->suggestions_url().empty()); - EXPECT_FALSE(t_urls[default_index]->instant_url().empty()); - // Expect at least 2 alternate_urls. - // This caught a bug with static initialization of arrays, so leave this in. - EXPECT_GT(t_urls[default_index]->alternate_urls().size(), 1u); - for (size_t i = 0; i < t_urls[default_index]->alternate_urls().size(); ++i) - EXPECT_FALSE(t_urls[default_index]->alternate_urls()[i].empty()); - EXPECT_EQ(SEARCH_ENGINE_GOOGLE, - TemplateURLPrepopulateData::GetEngineType(t_urls[default_index]->url())); -} - TEST(TemplateURLPrepopulateDataTest, GetEngineTypeBasic) { EXPECT_EQ(SEARCH_ENGINE_OTHER, TemplateURLPrepopulateData::GetEngineType("http://example.com/")); diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 8f04dd3..4d63315 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -12,7 +12,6 @@ 'dependencies': [ # NOTE: New dependencies should generally be added in the OS!="ios" # dependencies block below, rather than here. - 'browser/search_engines/prepopulated_engines.gyp:prepopulated_engines', 'browser_ui', 'cert_logger_proto', 'chrome_resources.gyp:chrome_extra_resources', diff --git a/tools/json_to_struct/PRESUBMIT.py b/tools/json_to_struct/PRESUBMIT.py deleted file mode 100644 index dd4d9a4..0000000 --- a/tools/json_to_struct/PRESUBMIT.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Presubmit script for changes affecting tools/json_to_struct/ - -See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts -for more details about the presubmit API built into gcl. -""" - -WHITELIST = [ r'.+_test.py$' ] - -def CheckChangeOnUpload(input_api, output_api): - return input_api.canned_checks.RunUnitTestsInDirectory( - input_api, output_api, '.', whitelist=WHITELIST) - - -def CheckChangeOnCommit(input_api, output_api): - return input_api.canned_checks.RunUnitTestsInDirectory( - input_api, output_api, '.', whitelist=WHITELIST) diff --git a/tools/json_to_struct/element_generator.py b/tools/json_to_struct/element_generator.py deleted file mode 100644 index 3a592d8..0000000 --- a/tools/json_to_struct/element_generator.py +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import json -import struct_generator - -def _JSONToCString16(json_string_literal): - """Converts a JSON string literal to a C++ UTF-16 string literal. This is - done by converting \\u#### to \\x####. - """ - c_string_literal = json_string_literal - escape_index = c_string_literal.find('\\') - while escape_index > 0: - if c_string_literal[escape_index + 1] == 'u': - # We close the C string literal after the 4 hex digits and reopen it right - # after, otherwise the Windows compiler will sometimes try to get more - # than 4 characters in the hex string. - c_string_literal = (c_string_literal[0:escape_index + 1] + 'x' + - c_string_literal[escape_index + 2:escape_index + 6] + '" L"' + - c_string_literal[escape_index + 6:]) - escape_index = c_string_literal.find('\\', escape_index + 6) - return c_string_literal - -def _GenerateString(content, lines): - """Generates an UTF-8 string to be included in a static structure initializer. - If content is not specified, uses NULL. - """ - if content is None: - lines.append(' NULL,') - else: - # json.dumps quotes the string and escape characters as required. - lines.append(' %s,' % json.dumps(content)) - -def _GenerateString16(content, lines): - """Generates an UTF-16 string to be included in a static structure - initializer. If content is not specified, uses NULL. - """ - if content is None: - lines.append(' NULL,') - else: - # json.dumps quotes the string and escape characters as required. - lines.append(' L%s,' % _JSONToCString16(json.dumps(content))) - -def _GenerateArray(field_info, content, lines): - """Generates an array to be included in a static structure initializer. If - content is not specified, uses NULL. The array is assigned to a temporary - variable which is initialized before the structure. - """ - if content is None: - lines.append(' NULL,') - lines.append(' 0,') # Size of the array. - return - - # Create a new array variable and use it in the structure initializer. - # This prohibits nested arrays. Add a clash detection and renaming mechanism - # to solve the problem. - var = 'array_%s' % field_info['field']; - lines.append(' %s,' % var) - lines.append(' %s,' % len(content)) # Size of the array. - # Generate the array content. - array_lines = [] - field_info['contents']['field'] = var; - array_lines.append(struct_generator.GenerateField( - field_info['contents']) + '[] = {') - for subcontent in content: - GenerateFieldContent(field_info['contents'], subcontent, array_lines) - array_lines.append('};') - # Prepend the generated array so it is initialized before the structure. - lines.reverse() - array_lines.reverse() - lines.extend(array_lines) - lines.reverse() - -def GenerateFieldContent(field_info, content, lines): - """Generate the content of a field to be included in the static structure - initializer. If the field's content is not specified, uses the default value - if one exists. - """ - if content is None: - content = field_info.get('default', None) - type = field_info['type'] - if type == 'int' or type == 'enum': - lines.append(' %s,' % content) - elif type == 'string': - _GenerateString(content, lines) - elif type == 'string16': - _GenerateString16(content, lines) - elif type == 'array': - _GenerateArray(field_info, content, lines) - else: - raise RuntimeError('Unknown field type "%s"' % type) - -def GenerateElement(type_name, schema, element_name, element): - """Generate the static structure initializer for one element. - """ - lines = []; - lines.append('const %s %s = {' % (type_name, element_name)); - for field_info in schema: - content = element.get(field_info['field'], None) - if (content == None and not field_info.get('optional', False)): - raise RuntimeError('Mandatory field "%s" omitted in element "%s".' % - (field_info['field'], element_name)) - GenerateFieldContent(field_info, content, lines) - lines.append('};') - return '\n'.join(lines) - -def GenerateElements(type_name, schema, description): - """Generate the static structure initializer for all the elements in the - description['elements'] dictionary, as well as for any variables in - description['int_variables']. - """ - result = []; - for var_name, value in description.get('int_variables', {}).items(): - result.append('const int %s = %s;' % (var_name, value)) - result.append('') - - for element_name, element in description.get('elements', {}).items(): - result.append(GenerateElement(type_name, schema, element_name, element)) - result.append('') - return '\n'.join(result) diff --git a/tools/json_to_struct/element_generator_test.py b/tools/json_to_struct/element_generator_test.py deleted file mode 100755 index 484e83f..0000000 --- a/tools/json_to_struct/element_generator_test.py +++ /dev/null @@ -1,158 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -from element_generator import GenerateFieldContent -from element_generator import GenerateElements -import unittest - -class ElementGeneratorTest(unittest.TestCase): - def testGenerateIntFieldContent(self): - lines = []; - GenerateFieldContent({'type': 'int', 'default': 5}, None, lines) - self.assertEquals([' 5,'], lines) - lines = []; - GenerateFieldContent({'type': 'int', 'default': 5}, 12, lines) - self.assertEquals([' 12,'], lines) - lines = []; - GenerateFieldContent({'type': 'int'}, -3, lines) - self.assertEquals([' -3,'], lines) - - def testGenerateStringFieldContent(self): - lines = []; - GenerateFieldContent({'type': 'string', 'default': 'foo_bar'}, None, lines) - self.assertEquals([' "foo_bar",'], lines) - lines = []; - GenerateFieldContent({'type': 'string', 'default': 'foo'}, 'bar\n', lines) - self.assertEquals([' "bar\\n",'], lines) - lines = []; - GenerateFieldContent({'type': 'string'}, None, lines) - self.assertEquals([' NULL,'], lines) - lines = []; - GenerateFieldContent({'type': 'string'}, 'foo', lines) - self.assertEquals([' "foo",'], lines) - - def testGenerateString16FieldContent(self): - lines = []; - GenerateFieldContent({'type': 'string16', 'default': u'f\u00d8\u00d81a'}, - None, lines) - self.assertEquals([' L"f\\x00d8" L"\\x00d8" L"1a",'], lines) - lines = []; - GenerateFieldContent({'type': 'string16', 'default': 'foo'}, u'b\uc3a5r', - lines) - self.assertEquals([' L"b\\xc3a5" L"r",'], lines) - lines = []; - GenerateFieldContent({'type': 'string16'}, None, lines) - self.assertEquals([' NULL,'], lines) - lines = []; - GenerateFieldContent({'type': 'string16'}, u'foo\\u1234', lines) - self.assertEquals([' L"foo\\\\u1234",'], lines) - - def testGenerateEnumFieldContent(self): - lines = []; - GenerateFieldContent({'type': 'enum', 'default': 'RED'}, None, lines) - self.assertEquals([' RED,'], lines) - lines = []; - GenerateFieldContent({'type': 'enum', 'default': 'RED'}, 'BLACK', lines) - self.assertEquals([' BLACK,'], lines) - lines = []; - GenerateFieldContent({'type': 'enum'}, 'BLUE', lines) - self.assertEquals([' BLUE,'], lines) - - def testGenerateArrayFieldContent(self): - lines = ['STRUCT BEGINS']; - GenerateFieldContent({'type': 'array', 'contents': {'type': 'int'}}, - None, lines) - self.assertEquals(['STRUCT BEGINS', ' NULL,', ' 0,'], lines) - lines = ['STRUCT BEGINS']; - GenerateFieldContent({'field': 'my_array', 'type': 'array', - 'contents': {'type': 'int'}}, [3, 4], lines) - self.assertEquals('const int array_my_array[] = {\n' + - ' 3,\n' + - ' 4,\n' + - '};\n' + - 'STRUCT BEGINS\n' + - ' array_my_array,\n' + - ' 2,', '\n'.join(lines)) - - def testGenerateElements(self): - schema = [ - {'field': 'f0', 'type': 'int', 'default': 1000, 'optional': True}, - {'field': 'f1', 'type': 'string'}, - {'field': 'f2', 'type': 'enum', 'ctype': 'QuasiBool', 'default': 'MAYBE', - 'optional': True}, - {'field': 'f3', 'type': 'array', 'contents': {'type': 'string16'}, - 'optional': True} - ] - description = { - 'int_variables': {'a': -5, 'b': 5}, - 'elements': { - 'elem0': {'f0': 5, 'f1': 'foo', 'f2': 'SURE'}, - 'elem1': {'f2': 'NOWAY', 'f0': -2, 'f1': 'bar'}, - 'elem2': {'f1': 'foo_bar', 'f3': [u'bar', u'foo']} - } - } - - # Build the expected result stream based on the unpredicatble order the - # dictionary element are listed in. - int_variable_expected = { - 'a': 'const int a = -5;\n', - 'b': 'const int b = 5;\n', - } - elements_expected = { - 'elem0': 'const MyType elem0 = {\n' + - ' 5,\n' + - ' "foo",\n' + - ' SURE,\n' + - ' NULL,\n' + - ' 0,\n' - '};\n', - 'elem1': 'const MyType elem1 = {\n' + - ' -2,\n' + - ' "bar",\n' + - ' NOWAY,\n' + - ' NULL,\n' + - ' 0,\n' - '};\n', - 'elem2': 'const wchar_t* const array_f3[] = {\n' + - ' L"bar",\n' + - ' L"foo",\n' + - '};\n' + - 'const MyType elem2 = {\n' + - ' 1000,\n' + - ' "foo_bar",\n' + - ' MAYBE,\n' + - ' array_f3,\n' + - ' 2,\n' - '};\n' - } - expected = '' - for key, value in description['int_variables'].items(): - expected += int_variable_expected[key] - expected += '\n' - elements = [] - for key, value in description['elements'].items(): - elements.append(elements_expected[key]) - expected += '\n'.join(elements) - - result = GenerateElements('MyType', schema, description) - self.assertEquals(expected, result) - - def testGenerateElementsMissingMandatoryField(self): - schema = [ - {'field': 'f0', 'type': 'int'}, - {'field': 'f1', 'type': 'string'}, - ] - description = { - 'int_variables': {'a': -5, 'b': 5}, - 'elements': { - 'elem0': {'f0': 5}, - } - } - - self.assertRaises(RuntimeError, - lambda: GenerateElements('MyType', schema, description)) - -if __name__ == '__main__': - unittest.main() diff --git a/tools/json_to_struct/json_to_struct.py b/tools/json_to_struct/json_to_struct.py deleted file mode 100755 index 8dfda44..0000000 --- a/tools/json_to_struct/json_to_struct.py +++ /dev/null @@ -1,199 +0,0 @@ -#!/usr/bin/env python -# Copyright 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# Format for the JSON schema file: -# { -# "type_name": "DesiredCStructName", -# "headers": [ // Optional list of headers to be included by the .h. -# "path/to/header.h" -# ], -# "schema": [ // Fields of the generated structure. -# { -# "field": "my_enum_field", -# "type": "enum", // Either: int, string, string16, enum, array. -# "default": "RED", // Optional. Cannot be used for array. -# "ctype": "Color" // Only for enum, specify the C type. -# }, -# { -# "field": "my_int_array_field", // my_int_array_field_size will also -# "type": "array", // be generated. -# "contents": { -# "type": "int" // Either: int, string, string16, enum, array. -# } -# }, -# ... -# ] -# } -# -# Format for the JSON description file: -# { -# "int_variables": { // An optional list of constant int variables. -# "kDesiredConstantName": 45 -# }, -# "elements": { // All the elements for which to create static -# // initialization code in the .cc file. -# "my_const_variable": { -# "my_int_field": 10, -# "my_string_field": "foo bar", -# "my_enum_field": "BLACK", -# "my_int_array_field": [ 1, 2, 3, 5, 7 ], -# }, -# "my_other_const_variable": { -# ... -# } -# } -# } - -import json -from datetime import datetime -import os.path -import sys -import optparse -import copy -_script_path = os.path.realpath(__file__) - -sys.path.insert(0, os.path.normpath(_script_path + "/../../")) -try: - import json_comment_eater -finally: - sys.path.pop(0) - -import struct_generator -import element_generator - -HEAD = """// Copyright %d The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// GENERATED FROM THE SCHEMA DEFINITION AND DESCRIPTION IN -// %s -// %s -// DO NOT EDIT. - -""" - -def _GenerateHeaderGuard(h_filename): - """Generates the string used in #ifndef guarding the header file. - """ - return (('%s_' % h_filename) - .upper().replace(os.sep, '_').replace('/', '_').replace('.', '_')) - -def _GenerateH(fileroot, head, namespace, schema, description): - """Generates the .h file containing the definition of the structure specified - by the schema. - - Args: - fileroot: The filename and path of the file to create, without an extension. - head: The string to output as the header of the .h file. - namespace: A string corresponding to the C++ namespace to use. - schema: A dict containing the schema. See comment at the top of this file. - description: A dict containing the description. See comment at the top of - this file. - """ - - h_filename = fileroot + '.h' - with open(h_filename, 'w') as f: - f.write(head) - - f.write('#include <cstddef>\n') - f.write('\n') - - header_guard = _GenerateHeaderGuard(h_filename) - f.write('#ifndef %s\n' % header_guard) - f.write('#define %s\n' % header_guard) - f.write('\n') - - for header in schema.get('headers', []): - f.write('#include "%s"\n' % header) - f.write('\n') - - if namespace: - f.write('namespace %s {\n' % namespace) - f.write('\n') - - f.write(struct_generator.GenerateStruct( - schema['type_name'], schema['schema'])) - f.write('\n') - - for var_name, value in description.get('int_variables', []).items(): - f.write('extern const int %s;\n' % var_name) - f.write('\n') - - for element_name, element in description['elements'].items(): - f.write('extern const %s %s;\n' % (schema['type_name'], element_name)) - - if namespace: - f.write('\n') - f.write('} // namespace %s\n' % namespace) - - f.write('\n') - f.write( '#endif // %s\n' % header_guard) - -def _GenerateCC(fileroot, head, namespace, schema, description): - """Generates the .cc file containing the static initializers for the - of the elements specified in the description. - - Args: - fileroot: The filename and path of the file to create, without an extension. - head: The string to output as the header of the .cc file. - namespace: A string corresponding to the C++ namespace to use. - schema: A dict containing the schema. See comment at the top of this file. - description: A dict containing the description. See comment at the top of - this file. - """ - with open(fileroot + '.cc', 'w') as f: - f.write(head) - - f.write('#include "%s"\n' % (fileroot + '.h')) - f.write('\n') - - if namespace: - f.write('namespace %s {\n' % namespace) - f.write('\n') - - f.write(element_generator.GenerateElements(schema['type_name'], - schema['schema'], description)) - - if namespace: - f.write('\n') - f.write('} // namespace %s\n' % namespace) - -def _Load(filename): - """Loads a JSON file int a Python object and return this object. - """ - # TODO(beaudoin): When moving to Python 2.7 use object_pairs_hook=OrderedDict. - with open(filename, 'r') as handle: - result = json.loads(json_comment_eater.Nom(handle.read())) - return result - -if __name__ == '__main__': - parser = optparse.OptionParser( - description='Generates an C++ array of struct from a JSON description.', - usage='usage: %prog [option] -s schema description') - parser.add_option('-d', '--destdir', - help='root directory to output generated files.') - parser.add_option('-n', '--namespace', - help='C++ namespace for generated files. e.g search_providers.') - parser.add_option('-s', '--schema', help='path to the schema file, ' - 'mandatory.') - (opts, args) = parser.parse_args() - - if not opts.schema: - parser.error('You must specify a --schema.') - - description_filename = os.path.normpath(args[0]) - root, ext = os.path.splitext(description_filename) - shortroot = os.path.split(root)[1] - if opts.destdir: - output_root = os.path.join(os.path.normpath(opts.destdir), shortroot) - else: - output_root = shortroot - - schema = _Load(opts.schema) - description = _Load(description_filename) - - head = HEAD % (datetime.now().year, opts.schema, description_filename) - _GenerateH(output_root, head, opts.namespace, schema, description) - _GenerateCC(output_root, head, opts.namespace, schema, description) diff --git a/tools/json_to_struct/struct_generator.py b/tools/json_to_struct/struct_generator.py deleted file mode 100644 index 501cb57..0000000 --- a/tools/json_to_struct/struct_generator.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -def _GenerateArrayField(field_info): - """Generate a string defining an array field in a C structure. - """ - contents = field_info['contents'] - contents['field'] = '* ' + field_info['field'] - if contents['type'] == 'array': - raise RuntimeError('Nested arrays are not supported.') - return (GenerateField(contents) + ';\n' + - ' const size_t %s_size') % field_info['field']; - -def GenerateField(field_info): - """Generate a string defining a field of the type specified by - field_info['type'] in a C structure. - """ - field = field_info['field'] - type = field_info['type'] - if type == 'int': - return 'const int %s' % field - elif type == 'string': - return 'const char* const %s' % field - elif type == 'string16': - return 'const wchar_t* const %s' % field - elif type == 'enum': - return 'const %s %s' % (field_info['ctype'], field) - elif type == 'array': - return _GenerateArrayField(field_info) - else: - raise RuntimeError('Unknown field type "%s"' % type) - -def GenerateStruct(type_name, schema): - """Generate a string defining a structure containing the fields specified in - the schema list. - """ - lines = []; - lines.append('struct %s {' % type_name) - for field_info in schema: - lines.append(' ' + GenerateField(field_info) + ';') - lines.append('};'); - return '\n'.join(lines) + '\n'; diff --git a/tools/json_to_struct/struct_generator_test.py b/tools/json_to_struct/struct_generator_test.py deleted file mode 100755 index 8566c33..0000000 --- a/tools/json_to_struct/struct_generator_test.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -from struct_generator import GenerateField -from struct_generator import GenerateStruct -import unittest - -class StructGeneratorTest(unittest.TestCase): - def testGenerateIntField(self): - self.assertEquals('const int foo_bar', - GenerateField({'type': 'int', 'field': 'foo_bar'})) - - def testGenerateStringField(self): - self.assertEquals('const char* const bar_foo', - GenerateField({'type': 'string', 'field': 'bar_foo'})) - - def testGenerateString16Field(self): - self.assertEquals('const wchar_t* const foo_bar', - GenerateField({'type': 'string16', 'field': 'foo_bar'})) - - def testGenerateEnumField(self): - self.assertEquals('const MyEnumType foo_foo', - GenerateField({'type': 'enum', - 'field': 'foo_foo', - 'ctype': 'MyEnumType'})) - - def testGenerateArrayField(self): - self.assertEquals('const int * bar_bar;\n' - ' const size_t bar_bar_size', - GenerateField({'type': 'array', - 'field': 'bar_bar', - 'contents': {'type': 'int'}})) - - def testGenerateStruct(self): - schema = [ - {'type': 'int', 'field': 'foo_bar'}, - {'type': 'string', 'field': 'bar_foo', 'default': 'dummy'}, - { - 'type': 'array', - 'field': 'bar_bar', - 'contents': { - 'type': 'enum', - 'ctype': 'MyEnumType' - } - } - ] - struct = ('struct MyTypeName {\n' - ' const int foo_bar;\n' - ' const char* const bar_foo;\n' - ' const MyEnumType * bar_bar;\n' - ' const size_t bar_bar_size;\n' - '};\n') - self.assertEquals(struct, GenerateStruct('MyTypeName', schema)) - -if __name__ == '__main__': - unittest.main() |