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

Unified Diff: chrome/browser/feedback/feedback_util.cc

Issue 15714003: Make Chrome feedback reports set X-Chrome-Variations headers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/feedback/feedback_util.cc
===================================================================
--- chrome/browser/feedback/feedback_util.cc (revision 201553)
+++ chrome/browser/feedback/feedback_util.cc (working copy)
@@ -17,6 +17,7 @@
#include "base/utf_string_conversions.h"
#include "base/win/windows_version.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/metrics/variations/variations_http_header_provider.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/safe_browsing_util.h"
#include "chrome/browser/ui/browser_list.h"
@@ -32,6 +33,7 @@
#include "grit/locale_settings.h"
#include "grit/theme_resources.h"
#include "net/base/load_flags.h"
+#include "net/http/http_request_headers.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "net/url_request/url_request_status.h"
@@ -200,6 +202,12 @@
fetcher->SetRequestContext(profile->GetRequestContext());
fetcher->SetLoadFlags(
net::LOAD_DO_NOT_SAVE_COOKIES | net::LOAD_DO_NOT_SEND_COOKIES);
+
+ net::HttpRequestHeaders headers;
+ chrome_variations::VariationsHttpHeaderProvider::GetInstance()->AppendHeaders(
+ fetcher->GetOriginalURL(), profile->IsOffTheRecord(), false, &headers);
+ fetcher->SetExtraRequestHeaders(headers.ToString());
+
fetcher->SetUploadData(std::string(kProtBufMimeType), *post_body);
fetcher->Start();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698