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_); |