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

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: Annotations updated. 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
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..4543c94860a1f80deb4608641e028b2adde16b2c 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 "
Marc Treib 2017/03/14 11:52:46 nit: Capitalize "Supervised User" (for consistency
Ramin Halavati 2017/03/14 11:58:36 Done.
+ "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 Chrome to "
+ "fetch OAuth credentials for using Sync with new profile."
Marc Treib 2017/03/14 11:52:46 s/with new/with the new/
Ramin Halavati 2017/03/14 11:58:36 Done.
+ 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}
+ RestrictSigninToPattern: false
Marc Treib 2017/03/14 11:52:46 I think this should be SupervisedUserCreationEnabl
Ramin Halavati 2017/03/14 11:58:36 Done.
+ }
+ }
+ })");
+ url_fetcher_ =
+ URLFetcher::Create(id, url, URLFetcher::POST, this, traffic_annotation);
data_use_measurement::DataUseUserData::AttachToFetcher(
url_fetcher_.get(),

Powered by Google App Engine
This is Rietveld 408576698