Chromium Code Reviews| 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_engined.h/cc. | |
| 6 | |
| 7 | |
| 8 { | |
| 9 "type_name": "PrepopulatedEngine", | |
| 10 "headers": [ | |
| 11 "chrome/browser/search_engines/search_engine_type.h" | |
| 12 ], | |
| 13 "schema": [ | |
| 14 { "field": "name", "type": "string16" }, | |
| 15 { "field": "keyword", "type" : "string16" }, | |
| 16 // If omitted, there is no favicon. | |
| 17 { "field": "favicon_url", "type" : "string" }, | |
| 18 { "field": "search_url", "type" : "string" }, | |
| 19 { "field": "encoding", "type" : "string" }, | |
| 20 // If omitted, this engine does not support suggestions. | |
| 21 { "field": "suggest_url", "type" : "string" }, | |
| 22 // If omitted, this engine does not support instant. | |
| 23 { "field": "instant_url", "type" : "string" }, | |
| 24 | |
| 25 // A list of URL patterns that can be used, in addition to |search_url|, | |
| 26 // to extract search terms from a URL. | |
| 27 { "field": "alternate_urls", "type": "string" }, | |
| 28 // Use SEARCH_ENGINE_OTHER if there is no matching type. | |
| 29 { | |
| 30 "field": "type", | |
| 31 "type": "enum", | |
| 32 "ctype": "SearchEngineType", | |
| 33 "default": "SEARCH_ENGINE_OTHER" | |
| 34 }, | |
| 35 // Unique id for this prepopulate engine (corresponds to | |
| 36 // TemplateURL::prepopulate_id). This ID must be greater than zero and must | |
| 37 // remain the same for a particular site regardless of how the url changes; | |
| 38 // the ID is used when modifying engine data in subsequent versions, so that | |
| 39 // we can find the "old" entry to update even when the name or URL changes. | |
| 40 // | |
| 41 // This ID must be "unique" within one country's prepopulated data, but two | |
| 42 // entries can share an ID if they represent the "same" engine (e.g. Yahoo! | |
| 43 // US vs. Yahoo! UK) and will not appear in the same user-visible data set. | |
| 44 // This facilitates changes like adding more specific per-country data in | |
| 45 // the future; in such a case the localized engines will transparently | |
| 46 // replace the previous, non-localized versions. For engines where we need | |
| 47 // two instances to appear for one country (e.g. Bing Search U.S. English | |
| 48 // and Spanish), we must use two different unique IDs (and different | |
| 49 // keywords). | |
| 50 // | |
| 51 // The following unique IDs are available: | |
| 52 // 53, 56, 58, 60, 61, 64, 65, 66, 70, 74, 78, 79, 80, 81, 84, 86, 88, | |
| 53 // 91, 92, 93, 94, 95, 96, 97, 98, 99, 102+ | |
|
Peter Kasting
2012/11/08 19:02:25
Seems like this list should be in the other JSON f
beaudoin
2012/11/09 04:16:53
Done.
| |
| 54 // | |
| 55 // IDs > 1000 are reserved for distribution custom engines. | |
| 56 // | |
| 57 // NOTES: | |
| 58 // CHANGE THE ABOVE NUMBERS IF YOU ADD A NEW ENGINE; ID conflicts = bad! | |
| 59 // CHANGE kMaxPrepopulatedEngineID in template_url_prepopulate_data.cc if | |
| 60 // you add new engine outside of the current range or it will not be | |
| 61 // counted in stats. | |
| 62 { "field": "id", "type": "int" } | |
| 63 ] | |
| 64 } | |
| OLD | NEW |