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

Unified Diff: components/signin/core/browser/gaia_cookie_manager_service.cc

Issue 2797173003: Network traffic annotation added to gaia_cookie_manager_service. (Closed)
Patch Set: Annotation updated. Created 3 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/signin/core/browser/gaia_cookie_manager_service.cc
diff --git a/components/signin/core/browser/gaia_cookie_manager_service.cc b/components/signin/core/browser/gaia_cookie_manager_service.cc
index a3aa65fe8ee2c95e6fe3d8ab3455e108b0d0a89c..a44912af9daef2024e551560cb196923d52a7a3e 100644
--- a/components/signin/core/browser/gaia_cookie_manager_service.cc
+++ b/components/signin/core/browser/gaia_cookie_manager_service.cc
@@ -25,6 +25,7 @@
#include "google_apis/gaia/oauth2_token_service.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_fetcher_delegate.h"
@@ -213,8 +214,33 @@ void GaiaCookieManagerService::ExternalCcResultFetcher::
std::unique_ptr<net::URLFetcher>
GaiaCookieManagerService::ExternalCcResultFetcher::CreateFetcher(
const GURL& url) {
- std::unique_ptr<net::URLFetcher> fetcher =
- net::URLFetcher::Create(0, url, net::URLFetcher::GET, this);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation(
+ "gaia_cookie_manager_external_cc_result", R"(
+ semantics {
+ sender: "Gaia Cookie Manager"
+ description:
+ "This request is used by the GaiaCookieManager when adding an "
+ "account to the Google authentication cookies to check the "
+ "authentication server's connection state."
+ trigger:
+ "This is used only once in the first merge session flow by the "
msramek 2017/05/09 11:58:20 Can we also update this for the external readers?
msarda 2017/05/10 08:56:39 How about: "This is used at most once per lifetime
Ramin Halavati 2017/05/10 09:16:04 Done.
+ "GaiaCookieManager. The value of the first fetch is stored for "
+ "future uses."
+ data: "None."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: false
+ setting: "This feature cannot be disabled in settings."
+ policy_exception_justification:
+ "Not implemented. Disabling GaiaCookieManager would break "
+ "features that depend on it (like account consistency and "
+ "support for child accounts). It makes sense to control top "
+ "level features that use the GaiaCookieManager."
+ })");
+ std::unique_ptr<net::URLFetcher> fetcher = net::URLFetcher::Create(
+ 0, url, net::URLFetcher::GET, this, traffic_annotation);
fetcher->SetRequestContext(helper_->request_context());
fetcher->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
net::LOAD_DO_NOT_SAVE_COOKIES);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698