Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Unified Diff: components/safe_browsing/password_protection/password_protection_request.cc

Issue 2802643002: Network traffic annotation added to password_protection_request (Closed)
Patch Set: Extra policy removed. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4a1f36f352ad4ddc8bd76b7ce303a3cdcd19356d..29757e7511a06c3f9055c2665fdf2b06a09026e8 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;
@@ -126,10 +127,41 @@ 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("password_protection_request", R"(
+ semantics {
+ sender: "Safe Browsing"
+ description:
+ "When the user is about to log in to a new, uncommon site, Chrome "
+ "will send a request to Safe Browsing to determine if the page is "
+ "phishing. It'll then show a warning if the page poses a risk of "
+ "phishing."
+ trigger:
+ "When a user focuses on a password field on a page that they "
+ "haven't visited before and that isn't popular or known to be safe."
+ data:
+ "URL and referrer of the current page, password form action, and "
+ "iframe structure."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: true
+ cookies_store: "Safe Browsing Cookie Store"
+ setting:
+ "Users can control this feature via 'Protect you and your device "
+ "from dangerous sites' or 'Automatically report details of "
+ "possible security incidents to Google' setting under 'Privacy'. "
+ "By default, the first setting is enabled and the second is not."
+ chrome_policy {
+ SafeBrowsingExtendedReportingOptInAllowed {
+ policy_options {mode: MANDATORY}
+ SafeBrowsingExtendedReportingOptInAllowed: false
+ }
+ }
+ })");
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698