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

Side by Side Diff: content/browser/streams/stream_handle_impl.cc

Issue 185663002: Pass http response headers to the streamsPrivate API callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/streams/stream_handle_impl.h" 5 #include "content/browser/streams/stream_handle_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "content/browser/streams/stream.h" 10 #include "content/browser/streams/stream.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 StreamHandleImpl::StreamHandleImpl(const base::WeakPtr<Stream>& stream, 14 StreamHandleImpl::StreamHandleImpl(const base::WeakPtr<Stream>& stream,
15 const GURL& original_url, 15 const GURL& original_url,
16 const std::string& mime_type) 16 const std::string& mime_type,
17 const std::string& response_headers)
17 : stream_(stream), 18 : stream_(stream),
18 url_(stream->url()), 19 url_(stream->url()),
19 original_url_(original_url), 20 original_url_(original_url),
20 mime_type_(mime_type), 21 mime_type_(mime_type),
22 response_headers_(response_headers),
21 stream_message_loop_(base::MessageLoopProxy::current().get()) {} 23 stream_message_loop_(base::MessageLoopProxy::current().get()) {}
22 24
23 StreamHandleImpl::~StreamHandleImpl() { 25 StreamHandleImpl::~StreamHandleImpl() {
24 stream_message_loop_->PostTask(FROM_HERE, 26 stream_message_loop_->PostTask(FROM_HERE,
25 base::Bind(&Stream::CloseHandle, stream_)); 27 base::Bind(&Stream::CloseHandle, stream_));
26 } 28 }
27 29
28 const GURL& StreamHandleImpl::GetURL() { 30 const GURL& StreamHandleImpl::GetURL() {
29 return url_; 31 return url_;
30 } 32 }
31 33
32 const GURL& StreamHandleImpl::GetOriginalURL() { 34 const GURL& StreamHandleImpl::GetOriginalURL() {
33 return original_url_; 35 return original_url_;
34 } 36 }
35 37
36 const std::string& StreamHandleImpl::GetMimeType() { 38 const std::string& StreamHandleImpl::GetMimeType() {
37 return mime_type_; 39 return mime_type_;
38 } 40 }
39 41
42 const std::string& StreamHandleImpl::GetResponseHeaders() {
43 return response_headers_;
44 }
45
40 } // namespace content 46 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698