OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 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 | |
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. | |
8 | |
9 { | |
10 "type_name": "PrepopulatedEngine", | |
11 "headers": [ | |
12 "chrome/browser/search_engines/search_engine_type.h" | |
13 ], | |
14 "schema": [ | |
15 { "field": "name", "type": "string16" }, | |
not at google - send to devlin
2012/11/12 18:38:13
Have you considered using JSON schema for this? Ch
beaudoin
2012/11/13 18:44:26
I considered it but decided against it because of
not at google - send to devlin
2012/11/13 20:28:07
I don't know about large overhead? It's just a mat
not at google - send to devlin
2012/11/13 20:34:56
Wild speculative thought: another option would be
| |
16 { "field": "keyword", "type": "string16" }, | |
17 // If omitted, there is no favicon. | |
Peter Kasting
2012/11/12 22:46:36
Do any of our engines not have a favicon? If not
beaudoin
2012/11/13 18:44:26
Most engines in the "UMA-only engines" do not defi
Peter Kasting
2012/11/13 19:23:10
Hmmm. I'm torn between making them define favicon
beaudoin
2012/11/13 21:42:03
Added the missing favicons and made it mandatory.
| |
18 { "field": "favicon_url", "type": "string" }, | |
19 { "field": "search_url", "type": "string" }, | |
20 { "field": "encoding", "type": "string", "default": "UTF-8" }, | |
21 // If omitted, this engine does not support suggestions. | |
22 { "field": "suggest_url", "type": "string" }, | |
23 // If omitted, this engine does not support instant. | |
24 { "field": "instant_url", "type": "string" }, | |
25 // A list of URL patterns that can be used, in addition to |search_url|, | |
26 // to extract search terms from a URL. | |
27 { | |
28 "field": "alternate_urls", | |
29 "type": "array", | |
30 "contents": { "type": "string" } | |
31 }, | |
32 { | |
33 "field": "type", | |
34 "type": "enum", | |
35 "ctype": "SearchEngineType", | |
36 "default": "SEARCH_ENGINE_OTHER" | |
37 }, | |
38 // Unique id for this prepopulate engine (corresponds to | |
39 // TemplateURL::prepopulate_id). This ID must be greater than zero and must | |
40 // remain the same for a particular site regardless of how the url changes; | |
41 // the ID is used when modifying engine data in subsequent versions, so that | |
42 // we can find the "old" entry to update even when the name or URL changes. | |
43 // | |
44 // This ID must be "unique" within one country's prepopulated data, but two | |
45 // entries can share an ID if they represent the "same" engine (e.g. Yahoo! | |
46 // US vs. Yahoo! UK) and will not appear in the same user-visible data set. | |
47 // This facilitates changes like adding more specific per-country data in | |
48 // the future; in such a case the localized engines will transparently | |
49 // replace the previous, non-localized versions. For engines where we need | |
50 // two instances to appear for one country (e.g. Bing Search U.S. English | |
51 // and Spanish), we must use two different unique IDs (and different | |
52 // keywords). | |
53 // | |
54 // See prepopulated_engines.json for the list of available IDs. | |
55 { "field": "id", "type": "int" } | |
56 ] | |
57 } | |
OLD | NEW |