Chromium Code Reviews| Index: tools/traffic_annotation/sample_traffic_annotation.h |
| diff --git a/tools/traffic_annotation/sample_traffic_annotation.h b/tools/traffic_annotation/sample_traffic_annotation.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..de4acd66f12fc74a13ed759ac60b1e80b713a9f8 |
| --- /dev/null |
| +++ b/tools/traffic_annotation/sample_traffic_annotation.h |
| @@ -0,0 +1,63 @@ |
| +// Copyright (c) 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// This file includes a sample and a template for text-coded traffic_annotation. |
|
asanka
2017/02/01 02:28:28
This is a sample file. Let's make it a .cc and hav
Ramin Halavati
2017/02/01 10:11:14
Done.
|
| +// For more description on each filed, please refer to |
|
asanka
2017/02/01 02:28:28
*field
Ramin Halavati
2017/02/01 10:11:13
Done.
|
| +// (tools/traffic_annotation/traffic_annotation.proto) |
| +// |
| +// Sample: |
| +// net::NetworkTrafficAnnotationTag traffic_annotation = |
| +// net::DefineNetworkTrafficAnnotation("spellcheck_lookup", R"( |
| +// semantics { |
| +// sender: "spellcheck" |
| +// description: |
| +// "Google Chrome can provide smarter spell-checking by sending " |
| +// "text you type into the browser to Google's servers, allowing " |
| +// "you to use the same spell-checking technology used by Google " |
| +// "products, such as Docs. If the feature is enabled, Chrome will " |
| +// "send the entire contents of text fields as you type in them to " |
| +// "Google along with the browser’s default language. Google " |
| +// "returns a list of suggested spellings, which will be displayed " |
| +// "in the context menu." |
| +// trigger: "User types text into a text field or asks to correct a " |
| +// "misspelled word." |
| +// data: "Text a user has typed into a text field. No user identifier " |
| +// "is sent along with the text." |
| +// destination: GOOGLE_OWNED_SERVICE |
| +// } |
| +// policy { |
| +// cookies_allowed: false |
| +// setting: |
| +// "You can enable or disable this feature via 'Use a web service to " |
| +// "help resolve spelling errors.' in Chrome's settings under " |
| +// "Advanced. The feature is disabled by default." |
| +// policy { |
| +// SpellCheckServiceEnabled { |
| +// policy_options {mode: MANDATORY} |
| +// value: false |
| +// } |
| +// } |
| +// })"); |
| +// |
| +// Template: |
| +// net::NetworkTrafficAnnotationTag traffic_annotation = |
| +// net::DefineNetworkTrafficAnnotation("", R"( |
| +// semantics { |
| +// sender: "" |
| +// description: "" |
| +// trigger: "" |
| +// data: "" |
| +// destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER |
| +// } |
| +// policy { |
|
asanka
2017/02/01 02:28:28
I'm still a bit unclear on how this policy is chec
battre
2017/02/01 03:48:24
For now this is less of an enforcement and more an
|
| +// cookies_allowed: false/true |
| +// cookies_store_exceptions: "" |
| +// setting: "" |
| +// policy { |
| +// [POLICY_NAME] { |
|
asanka
2017/02/01 02:28:28
Does this mean that each network traffic origin ne
battre
2017/02/01 03:48:24
In the first pass this is optional if no matching
|
| +// policy_options {mode: MANDATORY/RECOMMENDED/UNSET} |
| +// value: ... |
| +// } |
| +// } |
| +// })"); |