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

Unified Diff: google_apis/gaia/gaia_auth_fetcher.cc

Issue 2796293003: Network traffic annotation added to google_apis/gaia. (Closed)
Patch Set: Created 3 years, 8 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 | google_apis/gaia/gaia_oauth_client.cc » ('j') | google_apis/gaia/gaia_oauth_client.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/gaia_auth_fetcher.cc
diff --git a/google_apis/gaia/gaia_auth_fetcher.cc b/google_apis/gaia/gaia_auth_fetcher.cc
index 03bd8a4526d4b3ac930b2a06f26528ce67402351..52640d08a02aa0042c6839bc6d1916585b3f6a9a 100644
--- a/google_apis/gaia/gaia_auth_fetcher.cc
+++ b/google_apis/gaia/gaia_auth_fetcher.cc
@@ -26,6 +26,7 @@
#include "net/http/http_response_headers.h"
#include "net/http/http_status_code.h"
#include "net/http/http_util.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"
@@ -224,9 +225,30 @@ void GaiaAuthFetcher::CreateAndStartGaiaFetcher(const std::string& body,
const GURL& gaia_gurl,
int load_flags) {
DCHECK(!fetch_pending_) << "Tried to fetch two things at once!";
+ net::NetworkTrafficAnnotationTag traffic_annotation =
msarda 2017/05/03 09:03:53 This is a helper method that creates a fetcher tha
Ramin Halavati 2017/05/03 09:45:06 OK, do you that suggest I add annotation as an inp
msarda 2017/05/10 09:01:54 If we need to annotate each call differently, then
Ramin Halavati 2017/05/10 09:25:20 Can we can have a generic one here? If we decide t
+ net::DefineNetworkTrafficAnnotation("...", R"(
+ semantics {
+ sender: "..."
+ description: "..."
+ trigger: "..."
+ data: "..."
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
+ }
+ policy {
+ cookies_allowed: false/true
+ cookies_store: "..."
+ setting: "..."
+ chrome_policy {
+ [POLICY_NAME] {
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ [POLICY_NAME]: ... //(value to disable it)
+ }
+ }
+ policy_exception_justification: "..."
+ })");
fetcher_ = net::URLFetcher::Create(
0, gaia_gurl, body.empty() ? net::URLFetcher::GET : net::URLFetcher::POST,
- this);
+ this, traffic_annotation);
fetcher_->SetRequestContext(getter_);
fetcher_->SetUploadData("application/x-www-form-urlencoded", body);
gaia::MarkURLFetcherAsGaia(fetcher_.get());
« no previous file with comments | « no previous file | google_apis/gaia/gaia_oauth_client.cc » ('j') | google_apis/gaia/gaia_oauth_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698