prepopulated_engines_schema.json 4.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. // Copyright 2014 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. // This file is used by json_to_struct.py to generate prepopulated_engines.h/cc.
  5. // Any time you modify this file regenerate the .h/.cc. See
  6. // prepopulated_engines.json for details.
  7. {
  8. "type_name": "PrepopulatedEngine",
  9. "headers": [
  10. "components/search_engines/search_engine_type.h"
  11. ],
  12. "schema": [
  13. { "field": "name", "type": "string16" },
  14. { "field": "keyword", "type": "string16" },
  15. { "field": "favicon_url", "type": "string" },
  16. { "field": "search_url", "type": "string" },
  17. {
  18. "field": "encoding",
  19. "type": "string",
  20. "default": "UTF-8",
  21. "optional": true
  22. },
  23. // If omitted, this engine does not support suggestions.
  24. { "field": "suggest_url", "type": "string", "optional": true },
  25. // If omitted, this engine does not support image search.
  26. { "field": "image_url", "type": "string", "optional": true },
  27. // If omitted, this engine does not support rendering a new tab page.
  28. { "field": "new_tab_url", "type": "string", "optional": true },
  29. // If omitted, this engine does not support contextual search.
  30. { "field": "contextual_search_url", "type": "string", "optional": true },
  31. // If omitted, this engine does not support a static logo.
  32. { "field": "logo_url", "type": "string", "optional": true },
  33. // If omitted, this engine does not support doodles. Note: Only at most one
  34. // of "doodle_url" and "logo_url" should be set.
  35. { "field": "doodle_url", "type": "string", "optional": true },
  36. // The followings are post parameters for the corresponding search URL.
  37. // If omitted, a GET request will be sent when using the corresponding
  38. // search URL. Otherwise, a POST request will be sent.
  39. // The string of post parameters consists of comma-separated name/value
  40. // pairs, e.g.:
  41. // "name1=value1,name2={template1},...".
  42. // In each name/value pair, the equal sign('=') must be delimiter between
  43. // name and value. In above example, the "value1" is the constant value for
  44. // "name1", which is not replaceable. The {template1} is a replaceable value
  45. // for name2, the actual value will be replaced with real search terms data.
  46. { "field": "search_url_post_params", "type": "string", "optional": true },
  47. { "field": "suggest_url_post_params", "type": "string", "optional": true },
  48. { "field": "image_url_post_params", "type": "string", "optional": true },
  49. // The parameter appended to the engine's search URL when constructing the
  50. // URL for the side search side panel.
  51. { "field": "side_search_param", "type": "string", "optional": true },
  52. // A list of URL patterns that can be used, in addition to |search_url|,
  53. // to extract search terms from a URL.
  54. // If "search_url_post_params" is not empty, then all alternate URLs are
  55. // sent using POST with using same post parameters as the search URL.
  56. {
  57. "field": "alternate_urls",
  58. "type": "array",
  59. "contents": { "type": "string" },
  60. "optional": true
  61. },
  62. {
  63. "field": "type",
  64. "type": "enum",
  65. "ctype": "SearchEngineType",
  66. "default": "SEARCH_ENGINE_OTHER",
  67. "optional": true
  68. },
  69. // Whether a connection to search_url should regularly be established when
  70. // the engine is set as the "default search engine". "ALLOWED" is the only
  71. // value that will enable the pre-connections.
  72. { "field": "preconnect_to_search_url", "type": "string", "optional": true },
  73. // Whether the client is allowed to prefetch Search queries that are likely
  74. // (in addition to queries that are recommended via suggestion server). This
  75. // is experimental.
  76. { "field": "prefetch_likely_navigations", "type": "string", "optional": true },
  77. // Unique id for this prepopulate engine (corresponds to
  78. // TemplateURL::prepopulate_id). This ID must be greater than zero and must
  79. // remain the same for a particular site regardless of how the url changes;
  80. // the ID is used when modifying engine data in subsequent versions, so that
  81. // we can find the "old" entry to update even when the name or URL changes.
  82. //
  83. // This ID must be "unique" within one country's prepopulated data, but two
  84. // entries can share an ID if they represent the "same" engine (e.g. Yahoo!
  85. // US vs. Yahoo! UK) and will not appear in the same user-visible data set.
  86. // This facilitates changes like adding more specific per-country data in
  87. // the future; in such a case the localized engines will transparently
  88. // replace the previous, non-localized versions. For engines where we need
  89. // two instances to appear for one country (e.g. Bing Search U.S. English
  90. // and Spanish), we must use two different unique IDs (and different
  91. // keywords).
  92. //
  93. // See prepopulated_engines.json for the list of available IDs.
  94. { "field": "id", "type": "int" }
  95. ]
  96. }