Chromium Code Reviews| Index: google_apis/gaia/oauth2_access_token_fetcher_impl.cc |
| diff --git a/google_apis/gaia/oauth2_access_token_fetcher_impl.cc b/google_apis/gaia/oauth2_access_token_fetcher_impl.cc |
| index 1393f5550bba9378609f243db918deb7453f0c57..ba13aec90b1e2201b38dcbb363cdc5bd449ca241 100644 |
| --- a/google_apis/gaia/oauth2_access_token_fetcher_impl.cc |
| +++ b/google_apis/gaia/oauth2_access_token_fetcher_impl.cc |
| @@ -21,6 +21,7 @@ |
| #include "net/base/escape.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_context_getter.h" |
| #include "net/url_request/url_request_status.h" |
| @@ -96,8 +97,32 @@ static std::unique_ptr<URLFetcher> CreateFetcher( |
| const std::string& body, |
| URLFetcherDelegate* delegate) { |
| bool empty_body = body.empty(); |
| + net::NetworkTrafficAnnotationTag traffic_annotation = |
| + net::DefineNetworkTrafficAnnotation("oauth2_access_token_fetcher", R"( |
| + semantics { |
| + sender: "OAuth2 Access Token Fetcher" |
|
msarda
2017/05/22 11:49:36
Here and below:
s/OAuth2/Oauth 2.0
Ramin Halavati
2017/05/22 12:42:17
Done.
|
| + description: |
| + "This request is used by the Token Service to fetch an OAuth2 " |
| + "access token for a known Google account." |
| + trigger: |
| + "This request can be triggered at any moment when any service " |
| + "requests an OAuth2 access token from the Token Service." |
| + data: |
| + "Chrome OAuth2 client id and secret, the set of OAuth2 scopes and " |
| + "the OAuth2 refresh token." |
| + destination: GOOGLE_OWNED_SERVICE |
| + } |
| + policy { |
| + cookies_allowed: false |
| + setting: "This feature cannot be disabled in settings." |
| + policy_exception_justification: |
| + "Not implemented. Disabling Oauth2 Access Token Fetcher would " |
|
msarda
2017/05/22 11:49:36
Not sure about this policy statement. See comment
msarda
2017/05/22 11:49:36
s/Oauth2/OAuth 2.0
Ramin Halavati
2017/05/22 12:42:17
Done.
|
| + "break features need access tokens (e.g. sync, chrome identity " |
| + "API, etc)." |
| + })"); |
| std::unique_ptr<URLFetcher> result = net::URLFetcher::Create( |
| - 0, url, empty_body ? URLFetcher::GET : URLFetcher::POST, delegate); |
| + 0, url, empty_body ? URLFetcher::GET : URLFetcher::POST, delegate, |
| + traffic_annotation); |
| gaia::MarkURLFetcherAsGaia(result.get()); |
| result->SetRequestContext(getter); |