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

Side by Side Diff: net/nqe/effective_connection_type_observer.h

Issue 2927453002: Make NQE a derived class of NetworkQualityProvider (Closed)
Patch Set: Fix tests Created 3 years, 6 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_NQE_NETWORK_QUALITY_EFFECTIVE_CONNECTION_TYPE_OBSERVER_H_
6 #define NET_NQE_NETWORK_QUALITY_EFFECTIVE_CONNECTION_TYPE_OBSERVER_H_
7
8 #include "base/compiler_specific.h"
9 #include "base/gtest_prod_util.h"
10 #include "base/macros.h"
11 #include "net/nqe/effective_connection_type.h"
12
13 namespace net {
14
15 // Observes changes in effective connection type.
16 class NET_EXPORT EffectiveConnectionTypeObserver {
mmenke 2017/06/06 15:56:58 include net/base/net_export.h
tbansal1 2017/06/06 16:55:51 Done.
17 public:
18 // Notifies the observer of a change in the effective connection type.
19 // NetworkQualityEstimator computes the effective connection type once in
20 // every interval of duration
21 // |effective_connection_type_recomputation_interval_|. Additionally, when
22 // there is a change in the connection type of the device, then the
23 // effective connection type is immediately recomputed.
24 //
25 // If the computed effective connection type is different from the
26 // previously notified effective connection type, then all the registered
27 // observers are notified of the new effective connection type.
28 virtual void OnEffectiveConnectionTypeChanged(
29 EffectiveConnectionType type) = 0;
30
31 protected:
32 EffectiveConnectionTypeObserver() {}
33 virtual ~EffectiveConnectionTypeObserver() {}
34
35 private:
36 DISALLOW_COPY_AND_ASSIGN(EffectiveConnectionTypeObserver);
37 };
38
39 } // namespace net
40
41 #endif // NET_NQE_NETWORK_QUALITY_EFFECTIVE_CONNECTION_TYPE_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698