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

Unified Diff: components/policy/core/common/cloud/user_info_fetcher.cc

Issue 2800653002: Network traffic annotation added to common/cloud. (Closed)
Patch Set: Annotations updated. Created 3 years, 8 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/policy/core/common/cloud/external_policy_data_fetcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/cloud/user_info_fetcher.cc
diff --git a/components/policy/core/common/cloud/user_info_fetcher.cc b/components/policy/core/common/cloud/user_info_fetcher.cc
index bf5c78cc03402ab74656ad032c519a15a5ef2372..28e7d138297355a4ce73c567dc8107d1fc22c9e9 100644
--- a/components/policy/core/common/cloud/user_info_fetcher.cc
+++ b/components/policy/core/common/cloud/user_info_fetcher.cc
@@ -13,6 +13,7 @@
#include "google_apis/gaia/google_service_auth_error.h"
#include "net/base/load_flags.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_status.h"
#include "url/gurl.h"
@@ -41,10 +42,36 @@ UserInfoFetcher::~UserInfoFetcher() {
}
void UserInfoFetcher::Start(const std::string& access_token) {
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("user_info_fetcher", R"(
+ semantics {
+ sender: "Cloud Policy"
+ description:
+ "Calls to the Google Account service to check if the signed-in "
+ "user is managed."
+ trigger: "User signing in to Chrome."
+ data:
+ "Information about the user (specifically whether they are "
+ "managed, along with basic profile information from their Google "
Andrew T Wilson (Slow) 2017/04/27 12:15:31 Sorry, this is incorrect. The information we send
Ramin Halavati 2017/04/27 12:25:36 Thank you, Done.
+ "Account)."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: false
+ setting:
+ "This feature cannot be controlled by Chrome settings, but users "
+ "can sign out of Chrome to disable it."
+ chrome_policy {
+ SigninAllowed {
+ policy_options {mode: MANDATORY}
+ SigninAllowed: false
+ }
+ }
+ })");
// Create a URLFetcher and start it.
url_fetcher_ =
net::URLFetcher::Create(0, GaiaUrls::GetInstance()->oauth_user_info_url(),
- net::URLFetcher::GET, this);
+ net::URLFetcher::GET, this, traffic_annotation);
data_use_measurement::DataUseUserData::AttachToFetcher(
url_fetcher_.get(), data_use_measurement::DataUseUserData::POLICY);
url_fetcher_->SetRequestContext(context_);
« no previous file with comments | « components/policy/core/common/cloud/external_policy_data_fetcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698