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

Side by Side Diff: media/base/download_rate_monitor.h

Issue 9269027: Revert 118546 because it caused PrerenderHTML5VideoNetwork to timeout on windows and linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 11 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 | « no previous file | media/base/download_rate_monitor.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) 2012 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 #ifndef MEDIA_BASE_DOWNLOAD_RATE_MONITOR_H_ 5 #ifndef MEDIA_BASE_DOWNLOAD_RATE_MONITOR_H_
6 #define MEDIA_BASE_DOWNLOAD_RATE_MONITOR_H_ 6 #define MEDIA_BASE_DOWNLOAD_RATE_MONITOR_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/time.h" 11 #include "base/time.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // without needing to pause to buffer. 119 // without needing to pause to buffer.
120 base::Closure canplaythrough_cb_; 120 base::Closure canplaythrough_cb_;
121 121
122 // Indicates whether the monitor has run the |canplaythrough_cb_|. 122 // Indicates whether the monitor has run the |canplaythrough_cb_|.
123 bool has_notified_can_play_through_; 123 bool has_notified_can_play_through_;
124 124
125 // Measurements used to approximate download speed. 125 // Measurements used to approximate download speed.
126 Sample current_sample_; 126 Sample current_sample_;
127 std::deque<Sample> sample_window_; 127 std::deque<Sample> sample_window_;
128 128
129 // True if actively downloading bytes, false otherwise.
130 bool is_downloading_data_;
131
129 // Total number of bytes in the media file, 0 if unknown or undefined. 132 // Total number of bytes in the media file, 0 if unknown or undefined.
130 int64 total_bytes_; 133 int64 total_bytes_;
131 134
132 // Amount of bytes buffered. 135 // Amount of bytes buffered.
133 int64 buffered_bytes_; 136 int64 buffered_bytes_;
134 137
135 // True if the media file is from a local source, e.g. file:// protocol or a 138 // True if the media file is from a local source, e.g. file:// protocol or a
136 // webcam stream. 139 // webcam stream.
137 bool local_source_; 140 bool local_source_;
138 141
139 // Bitrate of the media file, 0 if unknown. 142 // Bitrate of the media file, 0 if unknown.
140 int bitrate_; 143 int bitrate_;
141 144
142 // True if the monitor has not yet started or has been stopped, false 145 // True if the monitor has not yet started or has been stopped, false
143 // otherwise. 146 // otherwise.
144 bool stopped_; 147 bool stopped_;
145 148
146 // True if the data source is a streaming source, false otherwise. 149 // True if the data source is a streaming source, false otherwise.
147 bool streaming_; 150 bool streaming_;
148 151
149 // True if downloading has been deferred at least once, false otherwise.
150 bool has_deferred_;
151
152 DISALLOW_COPY_AND_ASSIGN(DownloadRateMonitor); 152 DISALLOW_COPY_AND_ASSIGN(DownloadRateMonitor);
153 }; 153 };
154 154
155 } // namespace media 155 } // namespace media
156 156
157 #endif // MEDIA_BASE_DOWNLOAD_RATE_MONITOR_H_ 157 #endif // MEDIA_BASE_DOWNLOAD_RATE_MONITOR_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/download_rate_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698