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

Unified Diff: chrome/browser/supervised_user/legacy/supervised_user_refresh_token_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 | « chrome/browser/supervised_user/experimental/safe_search_url_reporter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/supervised_user/legacy/supervised_user_refresh_token_fetcher.cc
diff --git a/chrome/browser/supervised_user/legacy/supervised_user_refresh_token_fetcher.cc b/chrome/browser/supervised_user/legacy/supervised_user_refresh_token_fetcher.cc
index 153fc80249e738ff1a8407c847af5867cf7446f7..a8e1cb7d9ae07eeb7f2ab7c621c96d059732fad9 100644
--- a/chrome/browser/supervised_user/legacy/supervised_user_refresh_token_fetcher.cc
+++ b/chrome/browser/supervised_user/legacy/supervised_user_refresh_token_fetcher.cc
@@ -20,6 +20,7 @@
#include "net/base/load_flags.h"
#include "net/base/net_errors.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"
@@ -161,7 +162,40 @@ void SupervisedUserRefreshTokenFetcherImpl::OnGetTokenSuccess(
// unit tests.
const int id = 1;
- url_fetcher_ = URLFetcher::Create(id, url, URLFetcher::POST, this);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation(
+ "supervised_user_refresh_token_fetcher", R"(
+ semantics {
+ sender: "Supervised Users"
+ description:
+ "Fetches an OAuth2 refresh token scoped down to the Supervised "
+ "User Sync scope and tied to the given Supervised User ID, "
+ "identifying the Supervised User Profile to be created."
+ trigger:
+ "Called when creating a new Supervised User profile in Chromium "
+ "to fetch OAuth credentials for using Sync with the new profile."
+ data:
+ "The request is authenticated with an OAuth2 access token "
+ "identifying the Google account and contains the following "
+ "information:\n* The Supervised User ID, a randomly generated "
+ "64-bit identifier for the profile.\n* The device name, to "
+ "identify the refresh token in account management."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: false
+ setting:
+ "Users can disable this feature by toggling 'Let anyone add a "
+ "person to Chrome' in Chromium settings, under People."
+ chrome_policy {
+ SupervisedUserCreationEnabled {
+ policy_options {mode: MANDATORY}
+ SupervisedUserCreationEnabled: false
+ }
+ }
+ })");
+ url_fetcher_ =
+ URLFetcher::Create(id, url, URLFetcher::POST, this, traffic_annotation);
data_use_measurement::DataUseUserData::AttachToFetcher(
url_fetcher_.get(),
« no previous file with comments | « chrome/browser/supervised_user/experimental/safe_search_url_reporter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698