summaryrefslogtreecommitdiffstats
path: root/content/browser/streams/stream.cc
diff options
context:
space:
mode:
authorraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-26 05:01:11 +0000
committerraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-26 05:01:11 +0000
commite62b65a1dd07c8fd4e1fa61c67c65aecb75a316c (patch)
tree05c1d9816ee7eeff5d4cc232b5cfa9a9809a812b /content/browser/streams/stream.cc
parenta3d215ec60d3a3f1e9316e240d4b14d2a28426fc (diff)
downloadchromium_src-e62b65a1dd07c8fd4e1fa61c67c65aecb75a316c.zip
chromium_src-e62b65a1dd07c8fd4e1fa61c67c65aecb75a316c.tar.gz
chromium_src-e62b65a1dd07c8fd4e1fa61c67c65aecb75a316c.tar.bz2
Change the streamsPrivate extensions API to return HTTP response headers in a dictionary
This changes from returning the response headers as a raw string to a dictionary mapping header name to header value. If there are multiple headers with the same name, the values are merged in a dictionary and separated by a ", ". BUG=350755 Review URL: https://codereview.chromium.org/198463005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259496 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/streams/stream.cc')
-rw-r--r--content/browser/streams/stream.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/content/browser/streams/stream.cc b/content/browser/streams/stream.cc
index ca0cf1b..d10770c 100644
--- a/content/browser/streams/stream.cc
+++ b/content/browser/streams/stream.cc
@@ -7,11 +7,13 @@
#include "base/bind.h"
#include "base/location.h"
#include "base/message_loop/message_loop_proxy.h"
+#include "base/values.h"
#include "content/browser/streams/stream_handle_impl.h"
#include "content/browser/streams/stream_read_observer.h"
#include "content/browser/streams/stream_registry.h"
#include "content/browser/streams/stream_write_observer.h"
#include "net/base/io_buffer.h"
+#include "net/http/http_response_headers.h"
namespace {
// Start throttling the connection at about 1MB.
@@ -161,7 +163,7 @@ Stream::StreamState Stream::ReadRawData(net::IOBuffer* buf,
scoped_ptr<StreamHandle> Stream::CreateHandle(
const GURL& original_url,
const std::string& mime_type,
- const std::string& response_headers) {
+ scoped_refptr<net::HttpResponseHeaders> response_headers) {
CHECK(!stream_handle_);
stream_handle_ = new StreamHandleImpl(weak_ptr_factory_.GetWeakPtr(),
original_url,