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

Unified Diff: blimp/engine/app/blimp_system_url_request_context_getter.cc

Issue 2041933002: Add user agent to System Context Getter as suggested by metrics team. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comments as suggested. Created 4 years, 6 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: blimp/engine/app/blimp_system_url_request_context_getter.cc
diff --git a/blimp/engine/app/blimp_system_url_request_context_getter.cc b/blimp/engine/app/blimp_system_url_request_context_getter.cc
index 523a18b09aeee97b63f0acdee96973ba5c2e3743..c4c5bde3cd361056e6a783edb241883ca14463b2 100644
--- a/blimp/engine/app/blimp_system_url_request_context_getter.cc
+++ b/blimp/engine/app/blimp_system_url_request_context_getter.cc
@@ -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();
« 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