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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 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 "content/browser/streams/stream.h" 7 #include "content/browser/streams/stream.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 StreamHandleImpl::StreamHandleImpl(const base::WeakPtr<Stream>& stream, 12 StreamHandleImpl::StreamHandleImpl(const base::WeakPtr<Stream>& stream,
13 const GURL& original_url, 13 const GURL& original_url,
14 const std::string& mime_type) 14 const std::string& mime_type)
15 : stream_(stream), 15 : stream_(stream),
16 url_(stream->url()), 16 url_(stream->url()),
17 original_url_(original_url), 17 original_url_(original_url),
18 mime_type_(mime_type), 18 mime_type_(mime_type),
19 stream_message_loop_(base::MessageLoopProxy::current()) { 19 stream_message_loop_(base::MessageLoopProxy::current().get()) {}
20 }
21 20
22 StreamHandleImpl::~StreamHandleImpl() { 21 StreamHandleImpl::~StreamHandleImpl() {
23 stream_message_loop_->PostTask(FROM_HERE, 22 stream_message_loop_->PostTask(FROM_HERE,
24 base::Bind(&Stream::CloseHandle, stream_)); 23 base::Bind(&Stream::CloseHandle, stream_));
25 } 24 }
26 25
27 const GURL& StreamHandleImpl::GetURL() { 26 const GURL& StreamHandleImpl::GetURL() {
28 return url_; 27 return url_;
29 } 28 }
30 29
31 const GURL& StreamHandleImpl::GetOriginalURL() { 30 const GURL& StreamHandleImpl::GetOriginalURL() {
32 return original_url_; 31 return original_url_;
33 } 32 }
34 33
35 const std::string& StreamHandleImpl::GetMimeType() { 34 const std::string& StreamHandleImpl::GetMimeType() {
36 return mime_type_; 35 return mime_type_;
37 } 36 }
38 37
39 } // namespace content 38 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/storage_partition_impl_map.cc ('k') | content/browser/web_contents/navigation_controller_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698