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

Unified Diff: google_apis/gaia/oauth2_api_call_flow.cc

Issue 2888053003: Network traffic annotation added to OAuth2ApiCallFlow and its subclasses. (Closed)
Patch Set: 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
Index: google_apis/gaia/oauth2_api_call_flow.cc
diff --git a/google_apis/gaia/oauth2_api_call_flow.cc b/google_apis/gaia/oauth2_api_call_flow.cc
index e3d40f0e037e9c2a2164e764cb04bb56d758effe..64424f17114d73b53a5e36d721c3ebe90a841c17 100644
--- a/google_apis/gaia/oauth2_api_call_flow.cc
+++ b/google_apis/gaia/oauth2_api_call_flow.cc
@@ -35,12 +35,14 @@ OAuth2ApiCallFlow::OAuth2ApiCallFlow() : state_(INITIAL) {
OAuth2ApiCallFlow::~OAuth2ApiCallFlow() {}
-void OAuth2ApiCallFlow::Start(net::URLRequestContextGetter* context,
- const std::string& access_token) {
+void OAuth2ApiCallFlow::Start(
+ net::URLRequestContextGetter* context,
+ const std::string& access_token,
+ const net::NetworkTrafficAnnotationTag& traffic_annotation) {
CHECK(state_ == INITIAL);
state_ = API_CALL_STARTED;
- url_fetcher_ = CreateURLFetcher(context, access_token);
+ url_fetcher_ = CreateURLFetcher(context, access_token, traffic_annotation);
url_fetcher_->Start(); // OnURLFetchComplete will be called.
}
@@ -76,11 +78,12 @@ void OAuth2ApiCallFlow::OnURLFetchComplete(const net::URLFetcher* source) {
std::unique_ptr<URLFetcher> OAuth2ApiCallFlow::CreateURLFetcher(
net::URLRequestContextGetter* context,
- const std::string& access_token) {
+ const std::string& access_token,
+ const net::NetworkTrafficAnnotationTag& traffic_annotation) {
std::string body = CreateApiCallBody();
net::URLFetcher::RequestType request_type = GetRequestTypeForBody(body);
- std::unique_ptr<URLFetcher> result =
- net::URLFetcher::Create(0, CreateApiCallUrl(), request_type, this);
+ std::unique_ptr<URLFetcher> result = net::URLFetcher::Create(
+ 0, CreateApiCallUrl(), request_type, this, traffic_annotation);
gaia::MarkURLFetcherAsGaia(result.get());
result->SetRequestContext(context);
« google_apis/gaia/oauth2_api_call_flow.h ('K') | « google_apis/gaia/oauth2_api_call_flow.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698