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

Unified Diff: components/history/core/browser/web_history_service.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/history/core/browser/DEPS ('k') | components/network_time/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/core/browser/web_history_service.cc
diff --git a/components/history/core/browser/web_history_service.cc b/components/history/core/browser/web_history_service.cc
index e90d3b884e4f452b39c1a37daa4231c09bd5b34c..0ce75efc45b069c8244da35a5abe6e5c3d4cbe4b 100644
--- a/components/history/core/browser/web_history_service.cc
+++ b/components/history/core/browser/web_history_service.cc
@@ -16,6 +16,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
+#include "components/data_use_measurement/core/data_use_user_data.h"
#include "components/history/core/browser/history_service_observer.h"
#include "components/history/core/browser/web_history_service_observer.h"
#include "components/signin/core/browser/signin_manager.h"
@@ -178,6 +179,9 @@ class RequestImpl : public WebHistoryService::Request,
net::URLFetcher::POST : net::URLFetcher::GET;
std::unique_ptr<net::URLFetcher> fetcher =
net::URLFetcher::Create(url_, request_type, this);
+ data_use_measurement::DataUseUserData::AttachToFetcher(
+ fetcher.get(),
+ data_use_measurement::DataUseUserData::WEB_HISTORY_SERVICE);
fetcher->SetRequestContext(request_context_.get());
fetcher->SetMaxRetriesOn5xx(kMaxRetries);
fetcher->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
« no previous file with comments | « components/history/core/browser/DEPS ('k') | components/network_time/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698