Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: chrome/browser/search_engines/prepopulated_engines_schema.json

Issue 11377049: Moving prepopulated search engines to a JSON file. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Unit tests for python and C++. Added build step. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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" },
16 { "field": "keyword", "type": "string16" },
17 // If omitted, there is no favicon.
18 { "field": "favicon_url", "type": "string", "optional": true },
19 { "field": "search_url", "type": "string" },
20 {
21 "field": "encoding",
22 "type": "string",
23 "default": "UTF-8",
24 "optional": true
25 },
26 // If omitted, this engine does not support suggestions.
27 { "field": "suggest_url", "type": "string", "optional": true },
28 // If omitted, this engine does not support instant.
29 { "field": "instant_url", "type": "string", "optional": true },
30 // A list of URL patterns that can be used, in addition to |search_url|,
31 // to extract search terms from a URL.
32 {
33 "field": "alternate_urls",
34 "type": "array",
35 "contents": { "type": "string" },
36 "optional": true
37 },
38 {
39 "field": "type",
40 "type": "enum",
41 "ctype": "SearchEngineType",
42 "default": "SEARCH_ENGINE_OTHER",
43 "optional": true
44 },
45 // Unique id for this prepopulate engine (corresponds to
46 // TemplateURL::prepopulate_id). This ID must be greater than zero and must
47 // remain the same for a particular site regardless of how the url changes;
48 // the ID is used when modifying engine data in subsequent versions, so that
49 // we can find the "old" entry to update even when the name or URL changes.
50 //
51 // This ID must be "unique" within one country's prepopulated data, but two
52 // entries can share an ID if they represent the "same" engine (e.g. Yahoo!
53 // US vs. Yahoo! UK) and will not appear in the same user-visible data set.
54 // This facilitates changes like adding more specific per-country data in
55 // the future; in such a case the localized engines will transparently
56 // replace the previous, non-localized versions. For engines where we need
57 // two instances to appear for one country (e.g. Bing Search U.S. English
58 // and Spanish), we must use two different unique IDs (and different
59 // keywords).
60 //
61 // See prepopulated_engines.json for the list of available IDs.
62 { "field": "id", "type": "int" }
63 ]
64 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698