OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 NET_BASE_EXTERNAL_ESTIMATE_PROVIDER_H_ | 5 #ifndef NET_BASE_EXTERNAL_ESTIMATE_PROVIDER_H_ |
6 #define NET_BASE_EXTERNAL_ESTIMATE_PROVIDER_H_ | 6 #define NET_BASE_EXTERNAL_ESTIMATE_PROVIDER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // Returns true if the time since network quality was last updated is | 52 // Returns true if the time since network quality was last updated is |
53 // available, and sets |time_since_last_update| to that value. | 53 // available, and sets |time_since_last_update| to that value. |
54 virtual bool GetTimeSinceLastUpdate( | 54 virtual bool GetTimeSinceLastUpdate( |
55 base::TimeDelta* time_since_last_update) const = 0; | 55 base::TimeDelta* time_since_last_update) const = 0; |
56 | 56 |
57 // Sets delegate that is notified when an updated estimate is available. | 57 // Sets delegate that is notified when an updated estimate is available. |
58 // |delegate| should outlive |ExternalEstimateProvider|. | 58 // |delegate| should outlive |ExternalEstimateProvider|. |
59 virtual void SetUpdatedEstimateDelegate( | 59 virtual void SetUpdatedEstimateDelegate( |
60 UpdatedEstimateDelegate* delegate) = 0; | 60 UpdatedEstimateDelegate* delegate) = 0; |
61 | 61 |
| 62 // Requests an updated network quality estimate from the external estimate |
| 63 // provider. |
| 64 virtual void Update() const = 0; |
| 65 |
62 private: | 66 private: |
63 DISALLOW_COPY_AND_ASSIGN(ExternalEstimateProvider); | 67 DISALLOW_COPY_AND_ASSIGN(ExternalEstimateProvider); |
64 }; | 68 }; |
65 | 69 |
66 } // namespace net | 70 } // namespace net |
67 | 71 |
68 #endif // NET_BASE_EXTERNAL_ESTIMATE_PROVIDER_H_ | 72 #endif // NET_BASE_EXTERNAL_ESTIMATE_PROVIDER_H_ |
OLD | NEW |