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.
5 // This file is used by json_to_struct.py to generate prepopulated_engine.h/cc.
6 // Any time you modify this file regenerate the .h/.cc. See
7 // prepopulated_engines.json for details.
10 "type_name": "PrepopulatedEngine",
12 "components/search_engines/search_engine_type.h"
15 { "field": "name", "type": "string16" },
16 { "field": "keyword", "type": "string16" },
17 { "field": "favicon_url", "type": "string" },
18 { "field": "search_url", "type": "string" },
25 // If omitted, this engine does not support suggestions.
26 { "field": "suggest_url", "type": "string", "optional": true },
27 // If omitted, this engine does not support instant.
28 { "field": "instant_url", "type": "string", "optional": true },
29 // If omitted, this engine does not support image search.
30 { "field": "image_url", "type": "string", "optional": true },
31 // If omitted, this engine does not support rendering a new tab page.
32 { "field": "new_tab_url", "type": "string", "optional": true },
33 // If omitted, this engine does not support contextual search.
34 { "field": "contextual_search_url", "type": "string", "optional": true },
35 // The followings are post parameters for the corresponding search URL.
36 // If omitted, a GET request will be sent when using the corresponding
37 // search URL. Otherwise, a POST request will be sent.
38 // The string of post parameters consists of comma-separated name/value
40 // "name1=value1,name2={template1},...".
41 // In each name/value pair, the equal sign('=') must be delimiter between
42 // name and value. In above example, the "value1" is the constant value for
43 // "name1", which is not replaceable. The {template1} is a replaceable value
44 // for name2, the actual value will be replaced with real search terms data.
45 { "field": "search_url_post_params", "type": "string", "optional": true },
46 { "field": "suggest_url_post_params", "type": "string", "optional": true },
47 { "field": "instant_url_post_params", "type": "string", "optional": true },
48 { "field": "image_url_post_params", "type": "string", "optional": true },
49 // A list of URL patterns that can be used, in addition to |search_url|,
50 // to extract search terms from a URL.
51 // If "search_url_post_params" is not empty, then all alternate URLs are
52 // sent using POST with using same post parameters as the search URL.
54 "field": "alternate_urls",
56 "contents": { "type": "string" },
59 // A parameter that, if present in the query or ref parameters of a
60 // search_url or instant_url, causes Chrome to replace the URL with the
61 // search term. This can be {google:instantExtendedEnabledKey}.
63 "field": "search_terms_replacement_key",
70 "ctype": "SearchEngineType",
71 "default": "SEARCH_ENGINE_OTHER",
74 // Unique id for this prepopulate engine (corresponds to
75 // TemplateURL::prepopulate_id). This ID must be greater than zero and must
76 // remain the same for a particular site regardless of how the url changes;
77 // the ID is used when modifying engine data in subsequent versions, so that
78 // we can find the "old" entry to update even when the name or URL changes.
80 // This ID must be "unique" within one country's prepopulated data, but two
81 // entries can share an ID if they represent the "same" engine (e.g. Yahoo!
82 // US vs. Yahoo! UK) and will not appear in the same user-visible data set.
83 // This facilitates changes like adding more specific per-country data in
84 // the future; in such a case the localized engines will transparently
85 // replace the previous, non-localized versions. For engines where we need
86 // two instances to appear for one country (e.g. Bing Search U.S. English
87 // and Spanish), we must use two different unique IDs (and different
90 // See prepopulated_engines.json for the list of available IDs.
91 { "field": "id", "type": "int" }