OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 //////////////////////////////////////////////////////////////////////////////// | 5 //////////////////////////////////////////////////////////////////////////////// |
6 // Threading considerations: | 6 // Threading considerations: |
7 // | 7 // |
8 // This class is designed to meet various threading guarantees starting from the | 8 // This class is designed to meet various threading guarantees starting from the |
9 // ones imposed by NetworkChangeNotifier: | 9 // ones imposed by NetworkChangeNotifier: |
10 // - The notifier can be constructed on any thread. | 10 // - The notifier can be constructed on any thread. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // This can also be seen as: | 56 // This can also be seen as: |
57 // Android platform -> NetworkChangeNotifier (Java) -> | 57 // Android platform -> NetworkChangeNotifier (Java) -> |
58 // NetworkChangeNotifierDelegateAndroid -> NetworkChangeNotifierAndroid. | 58 // NetworkChangeNotifierDelegateAndroid -> NetworkChangeNotifierAndroid. |
59 | 59 |
60 #include "net/android/network_change_notifier_android.h" | 60 #include "net/android/network_change_notifier_android.h" |
61 | 61 |
62 #include <unordered_set> | 62 #include <unordered_set> |
63 | 63 |
64 #include "base/android/build_info.h" | 64 #include "base/android/build_info.h" |
65 #include "base/macros.h" | 65 #include "base/macros.h" |
| 66 #include "base/message_loop/message_loop.h" |
66 #include "base/metrics/histogram_macros.h" | 67 #include "base/metrics/histogram_macros.h" |
67 #include "base/threading/thread.h" | 68 #include "base/threading/thread.h" |
68 #include "net/base/address_tracker_linux.h" | 69 #include "net/base/address_tracker_linux.h" |
69 #include "net/dns/dns_config_service_posix.h" | 70 #include "net/dns/dns_config_service_posix.h" |
70 | 71 |
71 namespace net { | 72 namespace net { |
72 | 73 |
73 // Expose kInvalidNetworkHandle out to Java as NetId.INVALID. The notion of | 74 // Expose kInvalidNetworkHandle out to Java as NetId.INVALID. The notion of |
74 // a NetID is an Android framework one, see android.net.Network.netId. | 75 // a NetID is an Android framework one, see android.net.Network.netId. |
75 // NetworkChangeNotifierAndroid implements NetworkHandle to simply be the NetID. | 76 // NetworkChangeNotifierAndroid implements NetworkHandle to simply be the NetID. |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 NetworkChangeNotifier::GetConnectionType(); | 281 NetworkChangeNotifier::GetConnectionType(); |
281 NetworkChangeNotifier::LogOperatorCodeHistogram(type); | 282 NetworkChangeNotifier::LogOperatorCodeHistogram(type); |
282 if (NetworkChangeNotifier::IsConnectionCellular(type)) { | 283 if (NetworkChangeNotifier::IsConnectionCellular(type)) { |
283 UMA_HISTOGRAM_ENUMERATION("NCN.CellularConnectionSubtype", | 284 UMA_HISTOGRAM_ENUMERATION("NCN.CellularConnectionSubtype", |
284 delegate_->GetCurrentConnectionSubtype(), | 285 delegate_->GetCurrentConnectionSubtype(), |
285 SUBTYPE_LAST + 1); | 286 SUBTYPE_LAST + 1); |
286 } | 287 } |
287 } | 288 } |
288 | 289 |
289 } // namespace net | 290 } // namespace net |
OLD | NEW |