Make Chrome feedback reports set X-Chrome-Variations headers.

BUG=243035

Review URL: https://chromiumcodereview.appspot.com/15714003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202004 0039d316-1c4b-4281-b951-d872f2087c98
parent b5f008e1
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "base/utf_string_conversions.h" #include "base/utf_string_conversions.h"
#include "base/win/windows_version.h" #include "base/win/windows_version.h"
#include "chrome/browser/browser_process.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/profiles/profile.h"
#include "chrome/browser/safe_browsing/safe_browsing_util.h" #include "chrome/browser/safe_browsing/safe_browsing_util.h"
#include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_list.h"
...@@ -32,6 +33,7 @@ ...@@ -32,6 +33,7 @@
#include "grit/locale_settings.h" #include "grit/locale_settings.h"
#include "grit/theme_resources.h" #include "grit/theme_resources.h"
#include "net/base/load_flags.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.h"
#include "net/url_request/url_fetcher_delegate.h" #include "net/url_request/url_fetcher_delegate.h"
#include "net/url_request/url_request_status.h" #include "net/url_request/url_request_status.h"
...@@ -200,6 +202,12 @@ void FeedbackUtil::SendFeedback(Profile* profile, ...@@ -200,6 +202,12 @@ void FeedbackUtil::SendFeedback(Profile* profile,
fetcher->SetRequestContext(profile->GetRequestContext()); fetcher->SetRequestContext(profile->GetRequestContext());
fetcher->SetLoadFlags( fetcher->SetLoadFlags(
net::LOAD_DO_NOT_SAVE_COOKIES | net::LOAD_DO_NOT_SEND_COOKIES); 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->SetUploadData(std::string(kProtBufMimeType), *post_body);
fetcher->Start(); fetcher->Start();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment