OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 #include "net/traffic_annotation/network_traffic_annotation.h" |
| 6 |
| 7 // This file includes a sample and a template for text-coded traffic_annotation. |
| 8 // For more description on each field, please refer to: |
| 9 // (tools/traffic_annotation/traffic_annotation.proto) |
| 10 // For more information on policies, please refer to: |
| 11 // http://dev.chromium.org/administrators/policy-list-3 |
| 12 |
| 13 void network_traffic_annotation_sample() { |
| 14 net::NetworkTrafficAnnotationTag traffic_annotation = |
| 15 net::DefineNetworkTrafficAnnotation("spellcheck_lookup", R"( |
| 16 semantics { |
| 17 sender: "spellcheck" |
| 18 description: |
| 19 "Google Chrome can provide smarter spell-checking by sending " |
| 20 "text you type into the browser to Google's servers, allowing " |
| 21 "you to use the same spell-checking technology used by Google " |
| 22 "products, such as Docs. If the feature is enabled, Chrome will " |
| 23 "send the entire contents of text fields as you type in them to " |
| 24 "Google along with the browser’s default language. Google " |
| 25 "returns a list of suggested spellings, which will be displayed " |
| 26 "in the context menu." |
| 27 trigger: "User types text into a text field or asks to correct a " |
| 28 "misspelled word." |
| 29 data: "Text a user has typed into a text field. No user identifier " |
| 30 "is sent along with the text." |
| 31 destination: GOOGLE_OWNED_SERVICE |
| 32 } |
| 33 policy { |
| 34 cookies_allowed: false |
| 35 setting: |
| 36 "You can enable or disable this feature via 'Use a web service to " |
| 37 "help resolve spelling errors.' in Chrome's settings under " |
| 38 "Advanced. The feature is disabled by default." |
| 39 policy { |
| 40 SpellCheckServiceEnabled { |
| 41 policy_options {mode: MANDATORY} |
| 42 value: false |
| 43 } |
| 44 } |
| 45 })"); |
| 46 } |
| 47 |
| 48 void network_traffic_annotation_template() { |
| 49 net::NetworkTrafficAnnotationTag traffic_annotation = |
| 50 net::DefineNetworkTrafficAnnotation("", R"( |
| 51 semantics { |
| 52 sender: "" |
| 53 description: "" |
| 54 trigger: "" |
| 55 data: "" |
| 56 destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER |
| 57 } |
| 58 policy { |
| 59 cookies_allowed: false/true |
| 60 cookies_store: "" |
| 61 setting: "" |
| 62 policy { |
| 63 [POLICY_NAME] { |
| 64 policy_options {mode: MANDATORY/RECOMMENDED/UNSET} |
| 65 value: ... |
| 66 } |
| 67 } |
| 68 })"); |
| 69 } |
OLD | NEW |