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

Unified Diff: components/policy/resources/policy_templates.json

Issue 1368013004: Define Print Preview default printer selection policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 months 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 side-by-side diff with in-line comments
Download patch
Index: components/policy/resources/policy_templates.json
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json
index 6b9d615f64f558614252b86ab7dd3ac761a3aa88..78ff6b1cb6ea77cf08bc2b767b94f8a9cda95f6f 100644
--- a/components/policy/resources/policy_templates.json
+++ b/components/policy/resources/policy_templates.json
@@ -123,7 +123,7 @@
# persistent IDs for all fields (but not for groups!) are needed. These are
# specified by the 'id' keys of each policy. NEVER CHANGE EXISTING IDs,
# because doing so would break the deployed wire format!
-# For your editing convenience: highest ID currently used: 307
+# For your editing convenience: highest ID currently used: 308
#
# Placeholders:
# The following placeholder strings are automatically substituted:
@@ -4110,6 +4110,51 @@
If this policy is not set or is set to false, print commands trigger the print preview screen.''',
},
{
+ 'name': 'PrintPreviewDefaultPrinterSelection',
Thiemo Nagel 2015/10/09 16:35:48 Why not just DefaultPrinterSelection?
Aleksey Shlyapnikov 2015/10/09 21:02:51 In most other places settings and switches for Pri
Thiemo Nagel 2015/10/12 19:10:09 I think dropping the PrintPreview is easier for us
Aleksey Shlyapnikov 2015/10/13 18:14:57 Done.
+ 'type': 'string',
+ 'schema': { 'type': 'string' },
+ 'supported_on': ['chrome.*:47-', 'chrome_os:47-'],
Thiemo Nagel 2015/10/09 16:35:48 47 has sailed. Please change to 48.
Aleksey Shlyapnikov 2015/10/09 21:02:51 Done.
+ 'features': {
+ 'dynamic_refresh': True,
+ 'per_profile': True,
+ },
+ 'example_value': '{ "kind": "cloud", "namePattern": ".*Color" }',
Thiemo Nagel 2015/10/09 16:35:48 Please include an idPattern in the example, too.
Aleksey Shlyapnikov 2015/10/09 21:02:51 I'd imagine that in most cases you either match by
Thiemo Nagel 2015/10/12 19:10:09 I see. What is a printer id, anyways? I was expe
Aleksey Shlyapnikov 2015/10/13 18:14:57 It depends. For cloud printers that would be the c
Thiemo Nagel 2015/10/15 15:31:51 Thanks a lot for the explanation! Nit: Thinking a
Aleksey Shlyapnikov 2015/10/15 22:12:40 There're three fields and kind is always joined by
+ 'id': 308,
+ 'caption': '''Print Preview default printer selection policy''',
+ 'desc': '''Overrides <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> Print Preview default printer selection rules.
Thiemo Nagel 2015/10/09 16:35:48 How about: This policy determines the rules for s
Aleksey Shlyapnikov 2015/10/09 21:02:51 Done.
+
+ Default printer is selected by Print Preview when no printer was previously selected for the current profile.
+
+ When this policy is set, Print Preview will attempt to find a printer matching the specified attributes, printer type, printer id or name patterns, and select it as the current one.
Thiemo Nagel 2015/10/09 16:35:48 Please be more precise about how the final conditi
Aleksey Shlyapnikov 2015/10/09 21:02:51 It's "matching the _specified_ attributes", that i
+
+ If this policy is not set, Print Preview defaults to built-in PDF printer or no printer selected, when PDF printer is not available.
+
+ The value is parsed as JSON object, conforming to the following schema:
+ {
+ "type": "object",
+ "properties": {
+ "kind": {
Thiemo Nagel 2015/10/09 16:35:48 "kind" seems a bit non-descriptive, I think the te
Aleksey Shlyapnikov 2015/10/09 21:02:51 local includes, for example, printers provided by
+ "description": "Whether to limit the search of the matching printer to a specific set of printers.",
+ "type": {
+ "enum": [ "local", "cloud" ]
+ }
+ },
+ "idPattern": {
+ "description": "Regular expression to match printer id.",
+ "type": "string"
+ },
+ "namePattern": {
+ "description": "Regular expression to match printer display name.",
+ "type": "string"
+ }
+ }
+ }
+
+ Printers connected to Google Cloud Print are considered "cloud", the rest of the printers are classified as "local".
+ Omitting a field means all values match, for example, not specifying connectivity will cause Print Preview to initiate the discovery of all kinds of printers, local and cloud.
+ Regular expression patterns are case sensistive.''',
+ },
+ {
'name': 'DisableSSLRecordSplitting',
'type': 'main',
'schema': { 'type': 'boolean' },

Powered by Google App Engine
This is Rietveld 408576698