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

Side by Side Diff: content/browser/download/rate_estimator.h

Issue 18152002: Use a direct include of time headers in content/, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CONTENT_BROWSER_DOWNLOAD_RATE_ESTIMATOR_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_RATE_ESTIMATOR_H_
6 #define CONTENT_BROWSER_DOWNLOAD_RATE_ESTIMATOR_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_RATE_ESTIMATOR_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/time.h" 12 #include "base/time/time.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 // RateEstimator generates rate estimates based on recent activity. 17 // RateEstimator generates rate estimates based on recent activity.
18 // 18 //
19 // Internally it uses a fixed-size ring buffer, and develops estimates 19 // Internally it uses a fixed-size ring buffer, and develops estimates
20 // based on a small sliding window of activity. 20 // based on a small sliding window of activity.
21 class CONTENT_EXPORT RateEstimator { 21 class CONTENT_EXPORT RateEstimator {
22 public: 22 public:
(...skipping 20 matching lines...) Expand all
43 std::vector<uint32> history_; 43 std::vector<uint32> history_;
44 base::TimeDelta bucket_time_; 44 base::TimeDelta bucket_time_;
45 size_t oldest_index_; 45 size_t oldest_index_;
46 size_t bucket_count_; 46 size_t bucket_count_;
47 base::TimeTicks oldest_time_; 47 base::TimeTicks oldest_time_;
48 }; 48 };
49 49
50 } // namespace content 50 } // namespace content
51 51
52 #endif // CONTENT_BROWSER_DOWNLOAD_RATE_ESTIMATOR_H_ 52 #endif // CONTENT_BROWSER_DOWNLOAD_RATE_ESTIMATOR_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_resource_handler.h ('k') | content/browser/download/save_package.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698