| Index: chrome/browser/extensions/api/networking_private/networking_private_service_client.h
|
| diff --git a/chrome/browser/extensions/api/networking_private/networking_private_service_client.h b/chrome/browser/extensions/api/networking_private/networking_private_service_client.h
|
| index a708fc96e5e4bb3648f4bd71da57e6010250a1d4..78a35a29e86e4f212accfc8b347242c62206e19b 100644
|
| --- a/chrome/browser/extensions/api/networking_private/networking_private_service_client.h
|
| +++ b/chrome/browser/extensions/api/networking_private/networking_private_service_client.h
|
| @@ -22,6 +22,7 @@
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/utility_process_host.h"
|
| #include "content/public/browser/utility_process_host_client.h"
|
| +#include "net/base/network_change_notifier.h"
|
|
|
| namespace base {
|
| class SequencedTaskRunner;
|
| @@ -36,8 +37,12 @@ namespace extensions {
|
| using wifi::WiFiService;
|
|
|
| // The client wrapper for the WiFiService and CryptoVerify interfaces to invoke
|
| -// them on worker thread. Always used from UI thread only.
|
| -class NetworkingPrivateServiceClient : public BrowserContextKeyedService {
|
| +// them on worker thread. Observes |OnNetworkChanged| notifications and posts
|
| +// them to WiFiService on worker thread to |UpdateConnectedNetwork|. Always used
|
| +// from UI thread only.
|
| +class NetworkingPrivateServiceClient
|
| + : public BrowserContextKeyedService,
|
| + net::NetworkChangeNotifier::NetworkChangeObserver {
|
| public:
|
| // Interface for Verify* methods implementation.
|
| class CryptoVerify {
|
| @@ -188,6 +193,10 @@ class NetworkingPrivateServiceClient : public BrowserContextKeyedService {
|
| // then process can be shut down when there are no more calls pending return.
|
| void RemoveObserver(Observer* network_events_observer);
|
|
|
| + // NetworkChangeNotifier::NetworkChangeObserver implementation.
|
| + virtual void OnNetworkChanged(
|
| + net::NetworkChangeNotifier::ConnectionType type) OVERRIDE;
|
| +
|
| private:
|
| // Callbacks to extension api function objects. Keep reference to API object
|
| // and are released in ShutdownOnUIThread. Run when WiFiService calls back
|
|
|