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

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: Answered review comments. 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
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", "default": "UTF-8" },
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.
Peter Kasting 2012/11/09 22:07:23 Nit: Weird to comment this but not comment the UTF
beaudoin 2012/11/10 09:17:54 Done.
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 // See prepopulated_engines.json for the list of available IDs.
52 { "field": "id", "type": "int" }
53 ]
54 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698