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

Unified Diff: components/gcm_driver/gcm_channel_status_request.cc

Issue 2641293002: Add data usage tracking for chrome services (Closed)
Patch Set: Created 3 years, 11 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 | « components/gcm_driver/DEPS ('k') | components/history/core/browser/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/gcm_channel_status_request.cc
diff --git a/components/gcm_driver/gcm_channel_status_request.cc b/components/gcm_driver/gcm_channel_status_request.cc
index 6a73d8505092eaf20d64fbea1843ff46ad77e310..43c90eed2ced9358fe0878d38540ffff144af00b 100644
--- a/components/gcm_driver/gcm_channel_status_request.cc
+++ b/components/gcm_driver/gcm_channel_status_request.cc
@@ -8,6 +8,7 @@
#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "components/data_use_measurement/core/data_use_user_data.h"
#include "components/gcm_driver/gcm_backoff_policy.h"
#include "components/sync/protocol/experiment_status.pb.h"
#include "net/base/escape.h"
@@ -68,6 +69,8 @@ void GCMChannelStatusRequest::Start() {
url_fetcher_ =
net::URLFetcher::Create(request_url, net::URLFetcher::POST, this);
+ data_use_measurement::DataUseUserData::AttachToFetcher(
+ url_fetcher_.get(), data_use_measurement::DataUseUserData::GCM_DRIVER);
url_fetcher_->SetRequestContext(request_context_getter_.get());
url_fetcher_->AddExtraRequestHeader("User-Agent: " + user_agent_);
url_fetcher_->SetUploadData(kRequestContentType, upload_data);
« no previous file with comments | « components/gcm_driver/DEPS ('k') | components/history/core/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698