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

Unified Diff: components/variations/variations_http_header_provider.cc

Issue 666973003: [ServiceWorker] Don't send the UMA related headers to the ServiceWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/variations/variations_http_header_provider.cc
diff --git a/components/variations/variations_http_header_provider.cc b/components/variations/variations_http_header_provider.cc
index 12d9c9f4e365aafcae659da51fbfadf451314ce8..0038d4b9c9a38d1242ab568c6d59e92e9ced89d2 100644
--- a/components/variations/variations_http_header_provider.cc
+++ b/components/variations/variations_http_header_provider.cc
@@ -36,6 +36,10 @@ const char* kSuffixesToSetHeadersFor[] = {
".ytimg.com",
};
+// Keep in sync with service_worker_url_request_job.cc.
+const char kChromeUMAEnabled[] = "X-Chrome-UMA-Enabled";
+const char kClientData[] = "X-Client-Data";
+
} // namespace
VariationsHttpHeaderProvider* VariationsHttpHeaderProvider::GetInstance() {
@@ -61,7 +65,7 @@ void VariationsHttpHeaderProvider::AppendHeaders(
return;
if (uma_enabled)
- headers->SetHeaderIfMissing("X-Chrome-UMA-Enabled", "1");
+ headers->SetHeaderIfMissing(kChromeUMAEnabled, "1");
// Lazily initialize the header, if not already done, before attempting to
// transmit it.
@@ -75,8 +79,7 @@ void VariationsHttpHeaderProvider::AppendHeaders(
if (!variation_ids_header_copy.empty()) {
// Note that prior to M33 this header was named X-Chrome-Variations.
- headers->SetHeaderIfMissing("X-Client-Data",
- variation_ids_header_copy);
+ headers->SetHeaderIfMissing(kClientData, variation_ids_header_copy);
}
}

Powered by Google App Engine
This is Rietveld 408576698