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

Side by Side Diff: tools/traffic_annotation/sample_traffic_annotation.cc

Issue 2691233002: Updates in network traffic annotations proto definition. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « tools/traffic_annotation/DEPS ('k') | tools/traffic_annotation/traffic_annotation.proto » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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 #include "net/traffic_annotation/network_traffic_annotation.h" 5 #include "net/traffic_annotation/network_traffic_annotation.h"
6 6
7 // This file includes a sample and a template for text-coded traffic_annotation. 7 // This file includes a sample and a template for text-coded traffic_annotation.
8 // For more description on each field, please refer to: 8 // For more description on each field, please refer to:
9 // (tools/traffic_annotation/traffic_annotation.proto) 9 // tools/traffic_annotation/traffic_annotation.proto
10 // and
11 // out/Debug/gen/components/policy/proto/cloud_policy.proto
10 // For more information on policies, please refer to: 12 // For more information on policies, please refer to:
11 // http://dev.chromium.org/administrators/policy-list-3 13 // http://dev.chromium.org/administrators/policy-list-3
12 14
13 void network_traffic_annotation_sample() { 15 void network_traffic_annotation_sample() {
14 net::NetworkTrafficAnnotationTag traffic_annotation = 16 net::NetworkTrafficAnnotationTag traffic_annotation =
15 net::DefineNetworkTrafficAnnotation("spellcheck_lookup", R"( 17 net::DefineNetworkTrafficAnnotation("spellcheck_lookup", R"(
16 semantics { 18 semantics {
17 sender: "spellcheck" 19 sender: "Spellcheck Lookup"
battre 2017/02/14 08:09:17 I think that "Spellcheck Lookup" is an operation b
Ramin Halavati 2017/02/14 08:12:40 Done.
18 description: 20 description:
19 "Google Chrome can provide smarter spell-checking by sending " 21 "Google Chrome can provide smarter spell-checking by sending "
20 "text you type into the browser to Google's servers, allowing " 22 "text you type into the browser to Google's servers, allowing "
21 "you to use the same spell-checking technology used by Google " 23 "you to use the same spell-checking technology used by Google "
22 "products, such as Docs. If the feature is enabled, Chrome will " 24 "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 " 25 "send the entire contents of text fields as you type in them to "
24 "Google along with the browser’s default language. Google " 26 "Google along with the browser’s default language. Google "
25 "returns a list of suggested spellings, which will be displayed " 27 "returns a list of suggested spellings, which will be displayed "
26 "in the context menu." 28 "in the context menu."
27 trigger: "User types text into a text field or asks to correct a " 29 trigger: "User types text into a text field or asks to correct a "
(...skipping 12 matching lines...) Expand all
40 SpellCheckServiceEnabled { 42 SpellCheckServiceEnabled {
41 policy_options {mode: MANDATORY} 43 policy_options {mode: MANDATORY}
42 value: false 44 value: false
43 } 45 }
44 } 46 }
45 })"); 47 })");
46 } 48 }
47 49
48 void network_traffic_annotation_template() { 50 void network_traffic_annotation_template() {
49 net::NetworkTrafficAnnotationTag traffic_annotation = 51 net::NetworkTrafficAnnotationTag traffic_annotation =
50 net::DefineNetworkTrafficAnnotation("", R"( 52 net::DefineNetworkTrafficAnnotation("...", R"(
51 semantics { 53 semantics {
52 sender: "" 54 sender: "..."
53 description: "" 55 description: "..."
54 trigger: "" 56 trigger: "..."
55 data: "" 57 data: "..."
56 destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER 58 destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
57 } 59 }
58 policy { 60 policy {
59 cookies_allowed: false/true 61 cookies_allowed: false/true
60 cookies_store: "" 62 cookies_store: "..."
61 setting: "" 63 setting: "..."
62 policy { 64 policy {
63 [POLICY_NAME] { 65 [POLICY_NAME] {
64 policy_options {mode: MANDATORY/RECOMMENDED/UNSET} 66 policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
65 value: ... 67 value: ...
66 } 68 }
67 } 69 }
70 policy_exception_justification = "..."
68 })"); 71 })");
69 } 72 }
OLDNEW
« no previous file with comments | « tools/traffic_annotation/DEPS ('k') | tools/traffic_annotation/traffic_annotation.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698