Chromium Code Reviews| Index: components/safe_browsing/password_protection/password_protection_request.cc |
| diff --git a/components/safe_browsing/password_protection/password_protection_request.cc b/components/safe_browsing/password_protection/password_protection_request.cc |
| index 4cef597c7b7df81e4bbd6b73d9780f537d910c09..33c56195a3e66b057b9f787d3918f6c8c09273cd 100644 |
| --- a/components/safe_browsing/password_protection/password_protection_request.cc |
| +++ b/components/safe_browsing/password_protection/password_protection_request.cc |
| @@ -12,6 +12,7 @@ |
| #include "net/base/load_flags.h" |
| #include "net/base/url_util.h" |
| #include "net/http/http_status_code.h" |
| +#include "net/traffic_annotation/network_traffic_annotation.h" |
| using content::BrowserThread; |
| @@ -109,10 +110,30 @@ void PasswordProtectionRequest::SendRequest() { |
| // In case the request take too long, we set a timer to cancel this request. |
| StartTimeout(); |
| - |
| + net::NetworkTrafficAnnotationTag traffic_annotation = |
| + net::DefineNetworkTrafficAnnotation("...", R"( |
| + semantics { |
| + sender: "..." |
|
Nathan Parker
2017/04/14 21:39:38
Sender: Safe Browsing
desc: When the user is about
Ramin Halavati
2017/04/18 08:52:53
Done.
|
| + description: "..." |
| + trigger: "..." |
| + data: "..." |
| + destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER |
| + } |
| + 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: "..." |
|
Nathan Parker
2017/04/14 21:39:38
User can turn off Safe Browsing.
Ramin Halavati
2017/04/18 08:52:53
Done.
|
| + })"); |
| fetcher_ = net::URLFetcher::Create( |
| 0, PasswordProtectionService::GetPasswordProtectionRequestUrl(), |
| - net::URLFetcher::POST, this); |
| + net::URLFetcher::POST, this, traffic_annotation); |
| data_use_measurement::DataUseUserData::AttachToFetcher( |
| fetcher_.get(), data_use_measurement::DataUseUserData::SAFE_BROWSING); |
| fetcher_->SetLoadFlags(net::LOAD_DISABLE_CACHE); |