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

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

Issue 14081010: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some gtk issues Created 7 years, 8 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
« no previous file with comments | « content/browser/speech/speech_recognizer.cc ('k') | content/browser/tracing/tracing_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_url_request_job.h" 5 #include "content/browser/streams/stream_url_request_job.h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "content/browser/streams/stream.h" 8 #include "content/browser/streams/stream.h"
9 #include "net/base/io_buffer.h" 9 #include "net/base/io_buffer.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 pending_buffer_ = buf; 110 pending_buffer_ = buf;
111 pending_buffer_size_ = to_read; 111 pending_buffer_size_ = to_read;
112 SetStatus(net::URLRequestStatus(net::URLRequestStatus::IO_PENDING, 0)); 112 SetStatus(net::URLRequestStatus(net::URLRequestStatus::IO_PENDING, 0));
113 return false; 113 return false;
114 } 114 }
115 NOTREACHED(); 115 NOTREACHED();
116 return false; 116 return false;
117 } 117 }
118 118
119 bool StreamURLRequestJob::GetMimeType(std::string* mime_type) const { 119 bool StreamURLRequestJob::GetMimeType(std::string* mime_type) const {
120 if (!response_info_.get()) 120 if (!response_info_)
121 return false; 121 return false;
122 122
123 // TODO(zork): Support registered MIME types if needed. 123 // TODO(zork): Support registered MIME types if needed.
124 return response_info_->headers->GetMimeType(mime_type); 124 return response_info_->headers->GetMimeType(mime_type);
125 } 125 }
126 126
127 void StreamURLRequestJob::GetResponseInfo(net::HttpResponseInfo* info) { 127 void StreamURLRequestJob::GetResponseInfo(net::HttpResponseInfo* info) {
128 if (response_info_.get()) 128 if (response_info_)
129 *info = *response_info_; 129 *info = *response_info_;
130 } 130 }
131 131
132 int StreamURLRequestJob::GetResponseCode() const { 132 int StreamURLRequestJob::GetResponseCode() const {
133 if (!response_info_.get()) 133 if (!response_info_)
134 return -1; 134 return -1;
135 135
136 return response_info_->headers->response_code(); 136 return response_info_->headers->response_code();
137 } 137 }
138 138
139 void StreamURLRequestJob::SetExtraRequestHeaders( 139 void StreamURLRequestJob::SetExtraRequestHeaders(
140 const net::HttpRequestHeaders& headers) { 140 const net::HttpRequestHeaders& headers) {
141 std::string range_header; 141 std::string range_header;
142 if (headers.GetHeader(net::HttpRequestHeaders::kRange, &range_header)) { 142 if (headers.GetHeader(net::HttpRequestHeaders::kRange, &range_header)) {
143 std::vector<net::HttpByteRange> ranges; 143 std::vector<net::HttpByteRange> ranges;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 } 234 }
235 235
236 void StreamURLRequestJob::ClearStream() { 236 void StreamURLRequestJob::ClearStream() {
237 if (stream_) { 237 if (stream_) {
238 stream_->RemoveReadObserver(this); 238 stream_->RemoveReadObserver(this);
239 stream_ = NULL; 239 stream_ = NULL;
240 } 240 }
241 } 241 }
242 242
243 } // namespace content 243 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/speech/speech_recognizer.cc ('k') | content/browser/tracing/tracing_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698