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

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

Issue 268353013: Upstream changes to HttpUrlRequest for querying response headers and closing ReadableByteChannel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
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 a3b4aa787493fb59f35afbaef84f01aeb2aa9ffd..54094bf6773fc760639c32b003d348ae6d816922 100644
--- a/components/cronet/android/url_request_peer.cc
+++ b/components/cronet/android/url_request_peer.cc
@@ -70,6 +70,15 @@ void URLRequestPeer::AppendChunk(const char* bytes,
is_last_chunk));
}
+
+std::string URLRequestPeer::GetHeader(const std::string &name) const {
+ std::string value;
+ if (url_request_ != NULL) {
mmenke 2014/05/09 16:41:40 Long term, we really should probably get rid of al
mef 2014/05/09 18:49:16 sgtm
+ url_request_->GetResponseHeaderByName(name, &value);
+ }
+ return value;
+}
+
void URLRequestPeer::Start() {
context_->GetNetworkTaskRunner()->PostTask(
FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698