Commit c7c0bb03 authored by Ramin Halavati's avatar Ramin Halavati Committed by Commit Bot

Remove empty_policy_justification from traffic_annotation.proto.

'empty_policy_justification' field in traffic_annotation.proto is not
used in any annotation and doesn't seem to be needed. It is removed.

Bug: 656607
Change-Id: Iddde9ea668690b7a684d6f320b2cf952faa60e0c
Reviewed-on: https://chromium-review.googlesource.com/892880
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: default avatarMartin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532914}
parent 7f933e07
...@@ -123,9 +123,6 @@ Each network traffic annotation should specify the following items: ...@@ -123,9 +123,6 @@ Each network traffic annotation should specify the following items:
points to `OTHER`. points to `OTHER`.
* `TrafficPolicy`: These set of fields specify the controls that a user may have * `TrafficPolicy`: These set of fields specify the controls that a user may have
on disabling or limiting the network request and its trace. on disabling or limiting the network request and its trace.
* `empty_policy_justification`: If traffic policy cannot be specified, like
when the request originates from inside network stack and none of the below
control policies applies to it, a plain text here can specify it.
* `cookies_allowed`: Specifies if this request stores and uses cookies or * `cookies_allowed`: Specifies if this request stores and uses cookies or
not. Use values `YES` or `NO`. not. Use values `YES` or `NO`.
* `cookies_store`: If a request sends or stores cookies/channel IDs/... (i.e. * `cookies_store`: If a request sends or stores cookies/channel IDs/... (i.e.
...@@ -149,8 +146,7 @@ Each network traffic annotation should specify the following items: ...@@ -149,8 +146,7 @@ Each network traffic annotation should specify the following items:
request. This would be a text serialized protobuf of any enterprise policy. request. This would be a text serialized protobuf of any enterprise policy.
See policy list or chrome_settings.proto for the full list of policies. See policy list or chrome_settings.proto for the full list of policies.
* `policy_exception_justification`: If there is no policy to disable or limit * `policy_exception_justification`: If there is no policy to disable or limit
this request, a justification can be presented here. In case ‘Empty Policy this request, a justification can be presented here.
Justification’ is presented, this field is not required.
* `comments`: If required, any human readable extra comments. * `comments`: If required, any human readable extra comments.
### Format and Examples ### Format and Examples
...@@ -259,7 +255,6 @@ You can copy/paste the following template to define an annotation. ...@@ -259,7 +255,6 @@ You can copy/paste the following template to define an annotation.
destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
} }
policy { policy {
empty_policy_justification = "..."
cookies_allowed: NO/YES cookies_allowed: NO/YES
cookies_store: "..." cookies_store: "..."
setting: "..." setting: "..."
......
...@@ -99,4 +99,4 @@ and cc the people listed in OWNERS; they'll be on the hook to rebuild and ...@@ -99,4 +99,4 @@ and cc the people listed in OWNERS; they'll be on the hook to rebuild and
re-enable the test. re-enable the test.
CLANG_REVISION = '321529' CLANG_REVISION = '321529'
LASTCHANGE=671628d8a99b8420f4dadcdb82751c0d3ea2117a-refs/heads/master@{#530817} LASTCHANGE=c67646fb6096ac1d87b516b2eaf2eb9968d2da73-refs/heads/master@{#531988}
...@@ -452,7 +452,6 @@ AuditorResult AnnotationInstance::CreateCompleteAnnotation( ...@@ -452,7 +452,6 @@ AuditorResult AnnotationInstance::CreateCompleteAnnotation(
traffic_annotation::NetworkTrafficAnnotation_TrafficPolicy* dst_policy = traffic_annotation::NetworkTrafficAnnotation_TrafficPolicy* dst_policy =
combination->proto.mutable_policy(); combination->proto.mutable_policy();
MERGE_STRING_FIELDS(src_policy, dst_policy, empty_policy_justification);
MERGE_STRING_FIELDS(src_policy, dst_policy, cookies_store); MERGE_STRING_FIELDS(src_policy, dst_policy, cookies_store);
MERGE_STRING_FIELDS(src_policy, dst_policy, setting); MERGE_STRING_FIELDS(src_policy, dst_policy, setting);
......
...@@ -197,9 +197,8 @@ bool WriteAnnotationsFile(const base::FilePath& filepath, ...@@ -197,9 +197,8 @@ bool WriteAnnotationsFile(const base::FilePath& filepath,
std::vector<std::string> lines; std::vector<std::string> lines;
std::string title = std::string title =
"Unique ID\tLast Update\tSender\tDescription\tTrigger\tData\t" "Unique ID\tLast Update\tSender\tDescription\tTrigger\tData\t"
"Destination\tEmpty Policy Justification\tCookies Allowed\t" "Destination\tCookies Allowed\tCookies Store\tSetting\tChrome Policy\t"
"Cookies Store\tSetting\tChrome Policy\tComments\tSource File\t" "Comments\tSource File\tID Hash Code\tContent Hash Code";
"ID Hash Code\tContent Hash Code";
for (auto& instance : annotations) { for (auto& instance : annotations) {
if (instance.type != AnnotationInstance::Type::ANNOTATION_COMPLETE) if (instance.type != AnnotationInstance::Type::ANNOTATION_COMPLETE)
...@@ -250,8 +249,6 @@ bool WriteAnnotationsFile(const base::FilePath& filepath, ...@@ -250,8 +249,6 @@ bool WriteAnnotationsFile(const base::FilePath& filepath,
// Policy. // Policy.
const auto policy = instance.proto.policy(); const auto policy = instance.proto.policy();
line +=
base::StringPrintf("\t%s", policy.empty_policy_justification().c_str());
line += line +=
policy.cookies_allowed() == policy.cookies_allowed() ==
traffic_annotation:: traffic_annotation::
......
15452c1f82231c0d5a73ebd9468d36af6735b3f8 4114b4ddfc462968ff5a4f487c96981cdc1a1eb3
\ No newline at end of file \ No newline at end of file
...@@ -129,11 +129,6 @@ message NetworkTrafficAnnotation { ...@@ -129,11 +129,6 @@ message NetworkTrafficAnnotation {
TrafficSemantics semantics = 3; TrafficSemantics semantics = 3;
message TrafficPolicy { message TrafficPolicy {
// Justification for an empty traffic policy.
// This can be used for network requests that do not have any traffic
// control policy, such as those inside the network stack.
string empty_policy_justification = 1;
enum CookiesAllowed { enum CookiesAllowed {
// Do not use this value. It's just a placeholder for default value. // Do not use this value. It's just a placeholder for default value.
UNSPECIFIED = 0; UNSPECIFIED = 0;
...@@ -143,7 +138,7 @@ message NetworkTrafficAnnotation { ...@@ -143,7 +138,7 @@ message NetworkTrafficAnnotation {
// correct). // correct).
YES = 2; YES = 2;
} }
CookiesAllowed cookies_allowed = 2; CookiesAllowed cookies_allowed = 1;
// If a request sends or stores cookies/channel IDs/... (i.e. if // If a request sends or stores cookies/channel IDs/... (i.e. if
// cookies_allowed is true), we want to know which cookie store is being // cookies_allowed is true), we want to know which cookie store is being
...@@ -158,20 +153,20 @@ message NetworkTrafficAnnotation { ...@@ -158,20 +153,20 @@ message NetworkTrafficAnnotation {
// io_thread()->system_url_request_context_getter()), put "system" here. // io_thread()->system_url_request_context_getter()), put "system" here.
// Otherwise, please explain (e.g. SafeBrowsing uses a separate cookie // Otherwise, please explain (e.g. SafeBrowsing uses a separate cookie
// store). // store).
string cookies_store = 3; string cookies_store = 2;
// Human readable description of how to enable/disable a feature that // Human readable description of how to enable/disable a feature that
// triggers this network request by a user (e.g. “Disable ‘Use a web service // triggers this network request by a user (e.g. “Disable ‘Use a web service
// to help resolve spelling errors.’ in settings under Advanced”). // to help resolve spelling errors.’ in settings under Advanced”).
string setting = 4; string setting = 3;
// Policy configuration(s) that disable or limit this network request. // Policy configuration(s) that disable or limit this network request.
// This would be a text serialized protobuf of any enterprise policy. // This would be a text serialized protobuf of any enterprise policy.
// see out/Debug/gen/components/policy/proto/chrome_settings.proto // see out/Debug/gen/components/policy/proto/chrome_settings.proto
repeated enterprise_management.ChromeSettingsProto chrome_policy = 5; repeated enterprise_management.ChromeSettingsProto chrome_policy = 4;
// Justification for not having a policy that disables this feature. // Justification for not having a policy that disables this feature.
string policy_exception_justification = 6; string policy_exception_justification = 5;
} }
TrafficPolicy policy = 4; TrafficPolicy policy = 4;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment