Commit 117048d2 authored by jessicag's avatar jessicag Committed by Commit bot

Add user agent to System Context Getter as suggested by metrics team.

Currently the user agent is set to empty string which results in the
upload being ignored by the metrics service.

Setting this value will allow for processing and display of metrics
for Blimp.

BUG=592757

Review-Url: https://codereview.chromium.org/2041933002
Cr-Commit-Position: refs/heads/master@{#398155}
parent 67dc362c
......@@ -9,6 +9,7 @@
#include "base/logging.h"
#include "base/single_thread_task_runner.h"
#include "blimp/engine/common/blimp_user_agent.h"
#include "content/public/browser/browser_thread.h"
#include "net/proxy/proxy_service.h"
#include "net/url_request/url_request_context.h"
......@@ -18,7 +19,6 @@ namespace blimp {
namespace engine {
BlimpSystemURLRequestContextGetter::BlimpSystemURLRequestContextGetter() {
// Must first be created on the UI thread.
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
}
......@@ -30,9 +30,11 @@ BlimpSystemURLRequestContextGetter::GetURLRequestContext() {
if (!url_request_context_) {
// Use default values
net::URLRequestContextBuilder builder;
// TODO(jessicag): See if proxy_service setup should be harmonized with
// user request context getter. http://crbug/609981
builder.set_proxy_service(net::ProxyService::CreateDirect());
builder.set_user_agent(GetBlimpEngineUserAgent());
url_request_context_ = builder.Build();
}
return url_request_context_.get();
......
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