| Index: third_party/WebKit/Source/core/page/NetworkStateNotifier.h
|
| diff --git a/third_party/WebKit/Source/core/page/NetworkStateNotifier.h b/third_party/WebKit/Source/core/page/NetworkStateNotifier.h
|
| index c0bf4b615c9c46db858c79d51c514021070370b7..9a04c7ccf6a52ea452e9f548b4eafcebbcc13879 100644
|
| --- a/third_party/WebKit/Source/core/page/NetworkStateNotifier.h
|
| +++ b/third_party/WebKit/Source/core/page/NetworkStateNotifier.h
|
| @@ -44,6 +44,15 @@ class CORE_EXPORT NetworkStateNotifier {
|
| USING_FAST_MALLOC(NetworkStateNotifier);
|
|
|
| public:
|
| + struct NetworkState {
|
| + static const int kInvalidMaxBandwidth = -1;
|
| + bool onLineInitialized = false;
|
| + bool onLine = true;
|
| + bool connectionInitialized = false;
|
| + WebConnectionType type = WebConnectionTypeOther;
|
| + double maxBandwidthMbps = kInvalidMaxBandwidth;
|
| + };
|
| +
|
| class NetworkStateObserver {
|
| public:
|
| // Will be called on the task runner that is passed in add*Observer.
|
| @@ -129,16 +138,6 @@ class CORE_EXPORT NetworkStateNotifier {
|
| Vector<size_t> zeroedObservers; // Indices in observers that are 0.
|
| };
|
|
|
| - struct NetworkState {
|
| - static const int kInvalidMaxBandwidth = -1;
|
| - bool onLineInitialized = false;
|
| - bool onLine = true;
|
| - bool connectionInitialized = false;
|
| - WebConnectionType type = WebConnectionTypeOther;
|
| - double maxBandwidthMbps = kInvalidMaxBandwidth;
|
| - };
|
| - friend CrossThreadCopier<NetworkStateNotifier::NetworkState>;
|
| -
|
| // This helper scope issues required notifications when mutating the state if
|
| // something has changed. It's only possible to mutate the state on the main
|
| // thread. Note that ScopedNotifier must be destroyed when not holding a lock
|
|
|