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

Unified Diff: components/password_manager/core/browser/affiliation_fetcher.cc

Issue 2710583003: Network traffic annotation added to affiliation_fetcher. (Closed)
Patch Set: Comments addressed. Created 3 years, 10 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 | « components/password_manager/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/affiliation_fetcher.cc
diff --git a/components/password_manager/core/browser/affiliation_fetcher.cc b/components/password_manager/core/browser/affiliation_fetcher.cc
index 004c2213e522832dfbda32247408eded855fe170..b1dd01a944a9a3433755bba5ec525b53f9775319 100644
--- a/components/password_manager/core/browser/affiliation_fetcher.cc
+++ b/components/password_manager/core/browser/affiliation_fetcher.cc
@@ -16,6 +16,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"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_request_context_getter.h"
#include "url/gurl.h"
@@ -91,8 +92,39 @@ void AffiliationFetcher::SetFactoryForTesting(
void AffiliationFetcher::StartRequest() {
DCHECK(!fetcher_);
- fetcher_ =
- net::URLFetcher::Create(BuildQueryURL(), net::URLFetcher::POST, this);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("affiliation_lookup", R"(
+ semantics {
+ sender: "Android Credentials Affiliation Fetcher"
+ description:
+ "Users syncing their passwords may have credentials stored for "
+ "Android apps. Unless synced data is encrypted with a custom "
+ "passphrase, this service downloads the associations between "
+ "Android apps and the corresponding websites. Thus, the Android "
+ "credentials can be used while browsing the web. "
+ trigger: "Periodically in the background."
+ data:
+ "List of Android apps the user has credentials for. The passwords "
+ "and usernames aren't sent."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: false
+ setting:
+ "Users can enable or disable this feature either by stoping "
+ "syncing passwords to Google (via unchecking 'Passwords' in "
+ "Chrome's settings under 'Sign In', 'Advanced sync settings') or "
+ "by introducing a custom passphrase to disable this service. The "
+ "feature is enabled by default."
+ policy {
+ SyncDisabled {
+ policy_options {mode: MANDATORY}
+ value: True
+ }
+ }
+ })");
+ fetcher_ = net::URLFetcher::Create(BuildQueryURL(), net::URLFetcher::POST,
+ this, traffic_annotation);
fetcher_->SetRequestContext(request_context_getter_.get());
fetcher_->SetUploadData("application/x-protobuf", PreparePayload());
fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES |
« no previous file with comments | « components/password_manager/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698