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

Side by Side Diff: webkit/media/buffered_resource_loader.cc

Issue 9836102: Fold WebDataSource into BufferedDataSource. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: dcheck-o-rama Created 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/media/buffered_resource_loader.h" 5 #include "webkit/media/buffered_resource_loader.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 return; 533 return;
534 } 534 }
535 535
536 // Don't leave read callbacks hanging around. 536 // Don't leave read callbacks hanging around.
537 if (HasPendingRead()) { 537 if (HasPendingRead()) {
538 DoneRead(net::ERR_FAILED); 538 DoneRead(net::ERR_FAILED);
539 } 539 }
540 } 540 }
541 541
542 bool BufferedResourceLoader::HasSingleOrigin() const { 542 bool BufferedResourceLoader::HasSingleOrigin() const {
543 DCHECK(start_cb_.is_null())
544 << "Start() must complete before calling HasSingleOrigin()";
543 return single_origin_; 545 return single_origin_;
544 } 546 }
545 547
546 void BufferedResourceLoader::UpdateDeferStrategy(DeferStrategy strategy) { 548 void BufferedResourceLoader::UpdateDeferStrategy(DeferStrategy strategy) {
547 defer_strategy_ = strategy; 549 defer_strategy_ = strategy;
548 UpdateDeferBehavior(); 550 UpdateDeferBehavior();
549 } 551 }
550 552
551 void BufferedResourceLoader::SetPlaybackRate(float playback_rate) { 553 void BufferedResourceLoader::SetPlaybackRate(float playback_rate) {
552 playback_rate_ = playback_rate; 554 playback_rate_ = playback_rate;
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 if (buffer_.get()) { 828 if (buffer_.get()) {
827 media_log_->AddEvent( 829 media_log_->AddEvent(
828 media_log_->CreateBufferedExtentsChangedEvent( 830 media_log_->CreateBufferedExtentsChangedEvent(
829 offset_ - buffer_->backward_bytes(), 831 offset_ - buffer_->backward_bytes(),
830 offset_, 832 offset_,
831 offset_ + buffer_->forward_bytes())); 833 offset_ + buffer_->forward_bytes()));
832 } 834 }
833 } 835 }
834 836
835 } // namespace webkit_media 837 } // namespace webkit_media
OLDNEW
« no previous file with comments | « webkit/media/buffered_resource_loader.h ('k') | webkit/media/buffered_resource_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698