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

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

Issue 2421333002: Protobuf for Traffic Annotation and first use by a URLFetcher. (Closed)
Patch Set: More comments added. 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/OWNERS ('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
(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 }
OLDNEW
« no previous file with comments | « tools/traffic_annotation/OWNERS ('k') | tools/traffic_annotation/traffic_annotation.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698