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

Unified Diff: sync/internal_api/attachments/attachment_downloader_impl.cc

Issue 1330443002: Report data usage UMA for Chrome services (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NewArchServices
Patch Set: Updating the function name and some of gyp files. Created 5 years, 3 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: sync/internal_api/attachments/attachment_downloader_impl.cc
diff --git a/sync/internal_api/attachments/attachment_downloader_impl.cc b/sync/internal_api/attachments/attachment_downloader_impl.cc
index 2915296d9f1bf88fca9d8c13ceffa83594bbaf2a..267acf9e4dfe86a1ee345163946fd98e023ef7fe 100644
--- a/sync/internal_api/attachments/attachment_downloader_impl.cc
+++ b/sync/internal_api/attachments/attachment_downloader_impl.cc
@@ -12,6 +12,7 @@
#include "base/metrics/sparse_histogram.h"
#include "base/sys_byteorder.h"
#include "base/time/time.h"
+#include "components/data_use_measurement/core/data_use_user_data.h"
#include "net/base/load_flags.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_status_code.h"
@@ -208,6 +209,8 @@ scoped_ptr<net::URLFetcher> AttachmentDownloaderImpl::CreateFetcher(
const std::string& access_token) {
scoped_ptr<net::URLFetcher> url_fetcher =
net::URLFetcher::Create(GURL(url), net::URLFetcher::GET, this);
+ data_use_measurement::DataUseUserData::AttachToFetcher(
+ url_fetcher.get(), data_use_measurement::DataUseUserData::SYNC);
AttachmentUploaderImpl::ConfigureURLFetcherCommon(
url_fetcher.get(), access_token, raw_store_birthday_, model_type_,
url_request_context_getter_.get());

Powered by Google App Engine
This is Rietveld 408576698