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

Unified Diff: components/cronet/android/url_request_peer.cc

Issue 344793006: Generate Cronet Version.java based on VERSION and LASTCHANGE files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add Version to HttpUrlConnectionFactory.getName(). Created 6 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 | « components/cronet/android/url_request_context_peer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/url_request_peer.cc
diff --git a/components/cronet/android/url_request_peer.cc b/components/cronet/android/url_request_peer.cc
index 54094bf6773fc760639c32b003d348ae6d816922..e659d3281f60d3303b1a4c620598ccebec9cc237 100644
--- a/components/cronet/android/url_request_peer.cc
+++ b/components/cronet/android/url_request_peer.cc
@@ -12,10 +12,6 @@ namespace cronet {
static const size_t kBufferSizeIncrement = 8192;
-// Fragment automatically inserted in the User-Agent header to indicate
-// that the request is coming from this network stack.
-static const char kUserAgentFragment[] = "; ChromiumJNI/";
-
URLRequestPeer::URLRequestPeer(URLRequestContextPeer* context,
URLRequestPeerDelegate* delegate,
GURL url,
@@ -116,11 +112,6 @@ void URLRequestPeer::OnInitiateConnection() {
} else {
user_agent = context_->GetUserAgent(url_);
mmenke 2014/06/20 17:41:16 We never run this line, since we always pass in th
mef 2014/06/20 18:34:04 Isn't it possible, that there is no User-Agent hea
mmenke 2014/06/20 19:03:59 Ahh...you're right. I was thinking we were adding
}
- size_t pos = user_agent.find(')');
- if (pos != std::string::npos) {
- user_agent.insert(pos, context_->version());
- user_agent.insert(pos, kUserAgentFragment);
- }
url_request_->SetExtraRequestHeaderByName(
net::HttpRequestHeaders::kUserAgent, user_agent, true /* override */);
mmenke 2014/06/20 17:41:16 I don't believe this does anything if headers_.Has
mef 2014/06/20 18:34:04 Done. It used to stick Cronet version into it, but
« no previous file with comments | « components/cronet/android/url_request_context_peer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698