Commit 4351859d authored by rhalavati's avatar rhalavati Committed by Commit bot

Network traffic annotation added to url_provision_fetcher.

Network traffic annotation is added to network request of
url_provision_fetcher.

BUG=656607
------------------------------------------

Review-Url: https://codereview.chromium.org/2717483002
Cr-Commit-Position: refs/heads/master@{#462805}
parent 80f5122d
......@@ -8,6 +8,7 @@
#include "content/public/browser/provision_fetcher_factory.h"
#include "media/base/bind_to_current_loop.h"
#include "net/base/load_flags.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/url_fetcher.h"
using net::URLFetcher;
......@@ -33,7 +34,37 @@ void URLProvisionFetcher::Retrieve(
DVLOG(1) << __func__ << ": request:" << request_string;
DCHECK(!request_);
request_ = URLFetcher::Create(GURL(request_string), URLFetcher::POST, this);
net::NetworkTrafficAnnotationTag traffic_annotation =
net::DefineNetworkTrafficAnnotation("url_prevision_fetcher", R"(
semantics {
sender: "Content Decryption Module"
description:
"For a Content Decryption Module (CDM) to obtain origin-specific "
"identifiers from an individualization or provisioning server. See "
"https://w3c.github.io/encrypted-media/#direct-individualization."
trigger:
"During protected content playback, if the CDM hasn’t been "
"provisioned yet, it may trigger a provision request which will be "
"sent to a provisioning server."
data:
"Opaque provision request generated by the CDM. It may contain "
"distinctive identifiers (see "
"https://w3c.github.io/encrypted-media/#distinctive-identifier) "
"and/or distinctive permanent identifiers (see "
"https://w3c.github.io/encrypted-media/#distinctive-permanent-"
"identifier), which must be encrypted. It does NOT contain origin "
"information, even in encrypted form."
destination: OTHER
}
policy {
cookies_allowed: false
setting:
"On Android, users can disable this feature by disabling Protected "
"Media Identifier permissions."
policy_exception_justification: "Not implemented."
})");
request_ = URLFetcher::Create(GURL(request_string), URLFetcher::POST, this,
traffic_annotation);
// SetUploadData is mandatory even if we are not uploading anything.
request_->SetUploadData("", "");
......
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