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

Side by Side Diff: media/filters/file_data_source.cc

Issue 8936014: Removing DataSource from Filter hierarchy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved preload into a separate file. Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <limits> 5 #include <limits>
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "media/base/filter_host.h" 10 #include "media/base/filter_host.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 if (!file_) { 43 if (!file_) {
44 file_size_ = 0; 44 file_size_ = 0;
45 return PIPELINE_ERROR_URL_NOT_FOUND; 45 return PIPELINE_ERROR_URL_NOT_FOUND;
46 } 46 }
47 UpdateHostBytes(); 47 UpdateHostBytes();
48 48
49 return PIPELINE_OK; 49 return PIPELINE_OK;
50 } 50 }
51 51
52 void FileDataSource::set_host(FilterHost* filter_host) { 52 void FileDataSource::set_host(DataSourceHost* host) {
53 DataSource::set_host(filter_host); 53 DataSource::set_host(host);
54 UpdateHostBytes(); 54 UpdateHostBytes();
55 } 55 }
56 56
57 void FileDataSource::UpdateHostBytes() { 57 void FileDataSource::UpdateHostBytes() {
58 if (host() && file_) { 58 if (host() && file_) {
59 host()->SetTotalBytes(file_size_); 59 host()->SetTotalBytes(file_size_);
60 host()->SetBufferedBytes(file_size_); 60 host()->SetBufferedBytes(file_size_);
61 } 61 }
62 } 62 }
63 63
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 return false; 112 return false;
113 } 113 }
114 114
115 void FileDataSource::SetPreload(Preload preload) { 115 void FileDataSource::SetPreload(Preload preload) {
116 } 116 }
117 117
118 void FileDataSource::SetBitrate(int bitrate) { 118 void FileDataSource::SetBitrate(int bitrate) {
119 } 119 }
120 120
121 } // namespace media 121 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698