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

Unified Diff: components/suggestions/suggestions_service.cc

Issue 1279543002: Support needed to measure user and service traffic in Chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NewHistogram
Patch Set: Fix few formatting issues. Created 5 years, 4 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: components/suggestions/suggestions_service.cc
diff --git a/components/suggestions/suggestions_service.cc b/components/suggestions/suggestions_service.cc
index 666ee51bcc3b01208fb16bdec746ae7fa2fb0700..04789378ceabe0fe45f76252559f500ec809c140 100644
--- a/components/suggestions/suggestions_service.cc
+++ b/components/suggestions/suggestions_service.cc
@@ -16,6 +16,8 @@
#include "base/strings/stringprintf.h"
#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
+// The following line is commented because it violates dependency.
+// #include "chrome/browser/net/data_use_user_data.h"
sclittle 2015/08/19 23:32:40 Yeah, the data_use_measurement stuff should probab
amohammadkhan 2015/08/21 23:06:32 Done.
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/suggestions/blacklist_store.h"
#include "components/suggestions/suggestions_store.h"
@@ -253,6 +255,10 @@ scoped_ptr<net::URLFetcher> SuggestionsService::CreateSuggestionsRequest(
const GURL& url) {
scoped_ptr<net::URLFetcher> request =
net::URLFetcher::Create(0, url, net::URLFetcher::GET, this);
+ request->SetURLRequestUserData(
+ DataUseUserData::kUserDataKey,
+ base::Bind(&CreateDataUseUserData,
+ "Suggestion"));
request->SetLoadFlags(net::LOAD_DISABLE_CACHE);
request->SetRequestContext(url_request_context_);
// Add Chrome experiment state to the request headers.

Powered by Google App Engine
This is Rietveld 408576698