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

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

Issue 2710583003: Network traffic annotation added to affiliation_fetcher. (Closed)
Patch Set: Annotation updated. 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..24195d931a7cf5870556ba003549aa31f07b478c 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("android_affiliation", R"(
engedy 2017/02/21 12:39:18 nit: How about affiliation_lookup?
Ramin Halavati 2017/02/21 13:12:02 Done.
+ semantics {
+ sender: "Affiliation Fetcher"
+ description:
+ "Password storage of users syncing their passwords to Google "
engedy 2017/02/21 12:39:18 Suggestion for first sentence: Users syncing thei
Ramin Halavati 2017/02/21 13:12:02 Done.
+ "without a custom passphrase may contain credentials for Android "
+ "apps. This service downloads the associations between Android "
+ "apps and the corresponding websites. Thus, the android "
engedy 2017/02/21 12:39:18 nit: Android
Ramin Halavati 2017/02/21 13:12:02 Done.
+ "credentials can be used while browsing the web. "
+ trigger: "On startup."
engedy 2017/02/21 12:39:18 Yes, it's most often on start-up, but there are al
Ramin Halavati 2017/02/21 13:12:02 Done.
+ 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 "
engedy 2017/02/21 12:39:18 nit: Advanced
Ramin Halavati 2017/02/21 13:12:02 Done.
+ "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