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

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

Issue 11552020: Add search_terms_replacement_key field to TemplateURL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Answered PK's comments. Created 8 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file is used by json_to_struct.py to generate prepopulated_engine.h/cc. 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 6 // Any time you modify this file regenerate the .h/.cc. See
7 // prepopulated_engines.json for details. 7 // prepopulated_engines.json for details.
8 8
9 { 9 {
10 "type_name": "PrepopulatedEngine", 10 "type_name": "PrepopulatedEngine",
11 "headers": [ 11 "headers": [
12 "chrome/browser/search_engines/search_engine_type.h" 12 "chrome/browser/search_engines/search_engine_type.h"
13 ], 13 ],
14 "schema": [ 14 "schema": [
15 { "field": "name", "type": "string16" }, 15 { "field": "name", "type": "string16" },
16 { "field": "keyword", "type": "string16" }, 16 { "field": "keyword", "type": "string16" },
17 { "field": "favicon_url", "type": "string" }, 17 { "field": "favicon_url", "type": "string" },
18 { "field": "search_url", "type": "string" }, 18 { "field": "search_url", "type": "string" },
19 { 19 {
20 "field": "encoding", 20 "field": "encoding",
21 "type": "string", 21 "type": "string",
22 "default": "UTF-8", 22 "default": "UTF-8",
23 "optional": true 23 "optional": true
24 }, 24 },
25 // If omitted, this engine does not support suggestions. 25 // If omitted, this engine does not support suggestions.
26 { "field": "suggest_url", "type": "string", "optional": true }, 26 { "field": "suggest_url", "type": "string", "optional": true },
27 // If omitted, this engine does not support instant. 27 // If omitted, this engine does not support instant.
28 { "field": "instant_url", "type": "string", "optional": true }, 28 { "field": "instant_url", "type": "string", "optional": true },
29 // A list of URL patterns that can be used, in addition to |search_url|, 29 // A list of URL patterns that can be used, in addition to |search_url|,
30 // to extract search terms from a URL. 30 // to extract search terms from a URL.
31 { 31 {
32 "field": "alternate_urls", 32 "field": "alternate_urls",
33 "type": "array", 33 "type": "array",
34 "contents": { "type": "string" }, 34 "contents": { "type": "string" },
35 "optional": true 35 "optional": true
36 }, 36 },
37 // A parameter that, if present and non-zero in a search_url or
38 // instant_url, causes Chrome to replace the URL with the search term.
39 // The parameter must be in the query if the search terms are in the query,
40 // and in the ref if the search terms are in the ref.
41 {
42 "field": "search_terms_replacement_key",
43 "type": "string",
44 "optional": true
45 },
37 { 46 {
38 "field": "type", 47 "field": "type",
39 "type": "enum", 48 "type": "enum",
40 "ctype": "SearchEngineType", 49 "ctype": "SearchEngineType",
41 "default": "SEARCH_ENGINE_OTHER", 50 "default": "SEARCH_ENGINE_OTHER",
42 "optional": true 51 "optional": true
43 }, 52 },
44 // Unique id for this prepopulate engine (corresponds to 53 // Unique id for this prepopulate engine (corresponds to
45 // TemplateURL::prepopulate_id). This ID must be greater than zero and must 54 // TemplateURL::prepopulate_id). This ID must be greater than zero and must
46 // remain the same for a particular site regardless of how the url changes; 55 // remain the same for a particular site regardless of how the url changes;
47 // the ID is used when modifying engine data in subsequent versions, so that 56 // the ID is used when modifying engine data in subsequent versions, so that
48 // we can find the "old" entry to update even when the name or URL changes. 57 // we can find the "old" entry to update even when the name or URL changes.
49 // 58 //
50 // This ID must be "unique" within one country's prepopulated data, but two 59 // This ID must be "unique" within one country's prepopulated data, but two
51 // entries can share an ID if they represent the "same" engine (e.g. Yahoo! 60 // entries can share an ID if they represent the "same" engine (e.g. Yahoo!
52 // US vs. Yahoo! UK) and will not appear in the same user-visible data set. 61 // US vs. Yahoo! UK) and will not appear in the same user-visible data set.
53 // This facilitates changes like adding more specific per-country data in 62 // This facilitates changes like adding more specific per-country data in
54 // the future; in such a case the localized engines will transparently 63 // the future; in such a case the localized engines will transparently
55 // replace the previous, non-localized versions. For engines where we need 64 // replace the previous, non-localized versions. For engines where we need
56 // two instances to appear for one country (e.g. Bing Search U.S. English 65 // two instances to appear for one country (e.g. Bing Search U.S. English
57 // and Spanish), we must use two different unique IDs (and different 66 // and Spanish), we must use two different unique IDs (and different
58 // keywords). 67 // keywords).
59 // 68 //
60 // See prepopulated_engines.json for the list of available IDs. 69 // See prepopulated_engines.json for the list of available IDs.
61 { "field": "id", "type": "int" } 70 { "field": "id", "type": "int" }
62 ] 71 ]
63 } 72 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698