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

Unified Diff: google_apis/gaia/oauth2_access_token_fetcher_impl.cc

Issue 2486423002: Add data usage tracking for GAIA auth api and GCM engine service (Closed)
Patch Set: Fixed DEPS Created 4 years, 1 month 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 | « google_apis/gaia/gaia_oauth_client.cc ('k') | google_apis/gcm/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 267388f9f8c60ae80535624ce552840015e58be4..5ef55dd91d2efbe4bbfb38996844a8a3833342f6 100644
--- a/google_apis/gaia/oauth2_access_token_fetcher_impl.cc
+++ b/google_apis/gaia/oauth2_access_token_fetcher_impl.cc
@@ -15,6 +15,7 @@
#include "base/strings/stringprintf.h"
#include "base/time/time.h"
#include "base/values.h"
+#include "components/data_use_measurement/core/data_use_user_data.h"
#include "google_apis/gaia/gaia_urls.h"
#include "google_apis/gaia/google_service_auth_error.h"
#include "net/base/escape.h"
@@ -101,6 +102,8 @@ static std::unique_ptr<URLFetcher> CreateFetcher(
result->SetRequestContext(getter);
result->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
net::LOAD_DO_NOT_SAVE_COOKIES);
+ data_use_measurement::DataUseUserData::AttachToFetcher(
+ result.get(), data_use_measurement::DataUseUserData::GAIA_AUTH_FETCHER);
// Fetchers are sometimes cancelled because a network change was detected,
// especially at startup and after sign-in on ChromeOS. Retrying once should
// be enough in those cases; let the fetcher retry up to 3 times just in case.
« no previous file with comments | « google_apis/gaia/gaia_oauth_client.cc ('k') | google_apis/gcm/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698