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

Unified Diff: chrome/browser/supervised_user/child_accounts/family_info_fetcher.cc

Issue 2742743004: Network traffic annotation added to supervised users. (Closed)
Patch Set: Comments addressed. Created 3 years, 9 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 | chrome/browser/supervised_user/child_accounts/permission_request_creator_apiary.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/supervised_user/child_accounts/family_info_fetcher.cc
diff --git a/chrome/browser/supervised_user/child_accounts/family_info_fetcher.cc b/chrome/browser/supervised_user/child_accounts/family_info_fetcher.cc
index 28fbabb71b72bf3bb45ba1ac74d4d877eddb97f4..35f06fc9250087e7feb1005c299d1ff320e4f744 100644
--- a/chrome/browser/supervised_user/child_accounts/family_info_fetcher.cc
+++ b/chrome/browser/supervised_user/child_accounts/family_info_fetcher.cc
@@ -14,6 +14,7 @@
#include "components/data_use_measurement/core/data_use_user_data.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_request_status.h"
#include "url/gurl.h"
@@ -171,7 +172,35 @@ void FamilyInfoFetcher::OnGetTokenSuccess(
GURL url = kids_management_api::GetURL(request_path_);
const int id = 0;
- url_fetcher_ = net::URLFetcher::Create(id, url, net::URLFetcher::GET, this);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("family_info", R"(
+ semantics {
+ sender: "Supervised Users"
+ description:
+ "Fetches information about the user's family group from the Google "
+ "Family API."
+ trigger:
+ "Triggered in regular intervals to update profile information."
+ data:
+ "The request is authenticated with an OAuth2 access token "
+ "identifying the Google account. No other information is sent."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: false
+ setting:
+ "This feature cannot be disabled in settings and is only enabled "
+ "for child accounts. If sign-in is restricted to accounts from a "
+ "managed domain, those accounts are not going to be child accounts."
+ chrome_policy {
+ RestrictSigninToPattern {
+ policy_options {mode: MANDATORY}
+ RestrictSigninToPattern: "*@manageddomain.com"
+ }
+ }
+ })");
+ url_fetcher_ = net::URLFetcher::Create(id, url, net::URLFetcher::GET, this,
+ traffic_annotation);
data_use_measurement::DataUseUserData::AttachToFetcher(
url_fetcher_.get(),
« no previous file with comments | « no previous file | chrome/browser/supervised_user/child_accounts/permission_request_creator_apiary.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698