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

Side by Side Diff: webkit/glue/media/simple_data_source.cc

Issue 326003: Make GetURLForDebugging return a const GURL (Closed)
Patch Set: no const Created 11 years, 1 month 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
« no previous file with comments | « webkit/glue/media/simple_data_source.h ('k') | webkit/glue/resource_loader_bridge.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/process_util.h" 6 #include "base/process_util.h"
7 #include "media/base/filter_host.h" 7 #include "media/base/filter_host.h"
8 #include "net/base/load_flags.h" 8 #include "net/base/load_flags.h"
9 #include "net/base/data_url.h" 9 #include "net/base/data_url.h"
10 #include "net/http/http_response_headers.h" 10 #include "net/http/http_response_headers.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // If we don't get a content length or the request has failed, report it 154 // If we don't get a content length or the request has failed, report it
155 // as a network error. 155 // as a network error.
156 DCHECK(size_ == -1 || static_cast<size_t>(size_) == data_.length()); 156 DCHECK(size_ == -1 || static_cast<size_t>(size_) == data_.length());
157 if (size_ == -1) { 157 if (size_ == -1) {
158 size_ = data_.length(); 158 size_ = data_.length();
159 } 159 }
160 160
161 DoneInitialization_Locked(status.is_success()); 161 DoneInitialization_Locked(status.is_success());
162 } 162 }
163 163
164 std::string SimpleDataSource::GetURLForDebugging() { 164 GURL SimpleDataSource::GetURLForDebugging() const {
165 return url_.spec(); 165 return url_;
166 } 166 }
167 167
168 void SimpleDataSource::SetURL(const GURL& url) { 168 void SimpleDataSource::SetURL(const GURL& url) {
169 url_ = url; 169 url_ = url;
170 media_format_.Clear(); 170 media_format_.Clear();
171 media_format_.SetAsString(media::MediaFormat::kMimeType, 171 media_format_.SetAsString(media::MediaFormat::kMimeType,
172 media::mime_type::kApplicationOctetStream); 172 media::mime_type::kApplicationOctetStream);
173 media_format_.SetAsString(media::MediaFormat::kURL, url.spec()); 173 media_format_.SetAsString(media::MediaFormat::kURL, url.spec());
174 } 174 }
175 175
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // If scheme is file or data, say we are loaded. 219 // If scheme is file or data, say we are loaded.
220 host()->SetLoaded(url_.SchemeIsFile() || IsDataProtocol(url_)); 220 host()->SetLoaded(url_.SchemeIsFile() || IsDataProtocol(url_));
221 } else { 221 } else {
222 host()->SetError(media::PIPELINE_ERROR_NETWORK); 222 host()->SetError(media::PIPELINE_ERROR_NETWORK);
223 } 223 }
224 initialize_callback_->Run(); 224 initialize_callback_->Run();
225 initialize_callback_.reset(); 225 initialize_callback_.reset();
226 } 226 }
227 227
228 } // namespace webkit_glue 228 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/media/simple_data_source.h ('k') | webkit/glue/resource_loader_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698