Chromium Code Reviews| Index: content/browser/loader/resource_dispatcher_host_impl.cc |
| diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc |
| index 4a9724ec16cd5771bbf2add1558c8f68eb532f35..5197d67b264e1757552be078d18a01312eb58994 100644 |
| --- a/content/browser/loader/resource_dispatcher_host_impl.cc |
| +++ b/content/browser/loader/resource_dispatcher_host_impl.cc |
| @@ -105,6 +105,7 @@ |
| #include "net/log/net_log_with_source.h" |
| #include "net/ssl/client_cert_store.h" |
| #include "net/ssl/ssl_cert_request_info.h" |
| +#include "net/traffic_annotation/network_traffic_annotation.h" |
| #include "net/url_request/url_request.h" |
| #include "net/url_request/url_request_context.h" |
| #include "net/url_request/url_request_job_factory.h" |
| @@ -1203,11 +1204,32 @@ void ResourceDispatcherHostImpl::ContinuePendingBeginRequest( |
| return; |
| } |
| + net::NetworkTrafficAnnotationTag traffic_annotation = |
| + net::DefineNetworkTrafficAnnotation("...", R"( |
| + semantics { |
| + sender: "..." |
|
mmenke
2017/04/27 12:24:09
Renderer Process, and occasionally the Browser Pro
Ramin Halavati
2017/04/27 12:38:16
Can we call it "Resource Dispatcher Host"? The nam
mmenke
2017/04/27 15:20:05
Sure, if it's not supposed to have semantic meanin
Ramin Halavati
2017/04/28 05:40:36
I think that is more covered in |description| fiel
|
| + description: "..." |
|
mmenke
2017/04/27 12:24:10
Navigation-initiated request or renderer process i
Ramin Halavati
2017/04/27 12:38:17
Done.
|
| + trigger: "..." |
|
mmenke
2017/04/27 12:24:09
Navigating to a URL or downloading a file. A webp
Ramin Halavati
2017/04/27 12:38:17
Done.
|
| + data: "..." |
|
mmenke
2017/04/27 12:24:09
Anything the initiator wants to send.
Ramin Halavati
2017/04/27 12:38:16
Done.
|
| + destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER/LOCAL |
|
mmenke
2017/04/27 12:24:09
WEBSITE, GOOGLE_OWNED_SERVICE (For things like the
Ramin Halavati
2017/04/27 12:38:17
I will set it to OTHER as it supersedes the rest.
|
| + } |
| + policy { |
| + cookies_allowed: false/true |
|
mmenke
2017/04/27 12:24:09
true
Ramin Halavati
2017/04/27 12:38:17
Done.
|
| + cookies_store: "..." |
|
mmenke
2017/04/27 12:24:09
Both the main cookie store and per-app cookie stor
Ramin Halavati
2017/04/27 12:38:17
Done.
|
| + setting: "..." |
|
mmenke
2017/04/27 12:24:10
None. If you disable these requests, Chrome will
Ramin Halavati
2017/04/27 12:38:16
Done.
|
| + chrome_policy { |
| + [POLICY_NAME] { |
| + policy_options {mode: MANDATORY/RECOMMENDED/UNSET} |
| + [POLICY_NAME]: ... //(value to disable it) |
|
mmenke
2017/04/27 12:24:09
None, per above.
Ramin Halavati
2017/04/27 12:38:17
Done.
|
| + } |
| + } |
| + policy_exception_justification: "..." |
|
mmenke
2017/04/27 12:24:09
Without these requests, Chrome will be unable to l
Ramin Halavati
2017/04/27 12:38:16
Done.
|
| + })"); |
| // Construct the request. |
| std::unique_ptr<net::URLRequest> new_request = request_context->CreateRequest( |
| is_navigation_stream_request ? request_data.resource_body_stream_url |
| : request_data.url, |
| - request_data.priority, nullptr); |
| + request_data.priority, nullptr, traffic_annotation); |
| // Log that this request is a service worker navigation preload request here, |
| // since navigation preload machinery has no access to netlog. |
| @@ -1971,8 +1993,29 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest( |
| DCHECK(!(load_flags & net::LOAD_IGNORE_LIMITS)); |
| std::unique_ptr<net::URLRequest> new_request; |
| + net::NetworkTrafficAnnotationTag traffic_annotation = |
|
Ramin Halavati
2017/04/27 12:38:16
Should this annotation be the same as the other on
mmenke
2017/04/27 15:20:05
Yes. We could be more specific with these, but I
Ramin Halavati
2017/04/28 05:40:36
Acknowledged.
|
| + net::DefineNetworkTrafficAnnotation("...", R"( |
| + semantics { |
| + sender: "..." |
| + description: "..." |
| + trigger: "..." |
| + data: "..." |
| + destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER/LOCAL |
| + } |
| + policy { |
| + cookies_allowed: false/true |
| + cookies_store: "..." |
| + setting: "..." |
| + chrome_policy { |
| + [POLICY_NAME] { |
| + policy_options {mode: MANDATORY/RECOMMENDED/UNSET} |
| + [POLICY_NAME]: ... //(value to disable it) |
| + } |
| + } |
| + policy_exception_justification: "..." |
| + })"); |
| new_request = request_context->CreateRequest( |
| - info.common_params.url, net::HIGHEST, nullptr); |
| + info.common_params.url, net::HIGHEST, nullptr, traffic_annotation); |
| new_request->set_method(info.common_params.method); |
| new_request->set_first_party_for_cookies( |