Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 EXTENSIONS_BROWSER_API_SYSTEM_NETWORK_SYSTEM_NETWORK_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_SYSTEM_NETWORK_SYSTEM_NETWORK_API_H_ |
| 6 #define EXTENSIONS_BROWSER_API_SYSTEM_NETWORK_SYSTEM_NETWORK_API_H_ | 6 #define EXTENSIONS_BROWSER_API_SYSTEM_NETWORK_SYSTEM_NETWORK_API_H_ |
| 7 | 7 |
| 8 #include "extensions/browser/extension_function.h" | 8 #include "extensions/browser/extension_function.h" |
| 9 #include "extensions/common/api/system_network.h" | 9 #include "extensions/common/api/system_network.h" |
| 10 #include "net/base/net_util.h" | 10 #include "net/base/net_util.h" |
|
Reilly Grant (use Gerrit)
2015/08/12 17:45:07
I believe "net/base/net_util.h" is now an unnecess
| |
| 11 #include "net/base/network_interfaces.h" | |
| 11 | 12 |
| 12 namespace extensions { | 13 namespace extensions { |
| 13 namespace api { | 14 namespace api { |
| 14 | 15 |
| 15 class SystemNetworkGetNetworkInterfacesFunction | 16 class SystemNetworkGetNetworkInterfacesFunction |
| 16 : public AsyncExtensionFunction { | 17 : public AsyncExtensionFunction { |
| 17 public: | 18 public: |
| 18 DECLARE_EXTENSION_FUNCTION("system.network.getNetworkInterfaces", | 19 DECLARE_EXTENSION_FUNCTION("system.network.getNetworkInterfaces", |
| 19 SYSTEM_NETWORK_GETNETWORKINTERFACES) | 20 SYSTEM_NETWORK_GETNETWORKINTERFACES) |
| 20 | 21 |
| 21 SystemNetworkGetNetworkInterfacesFunction(); | 22 SystemNetworkGetNetworkInterfacesFunction(); |
| 22 | 23 |
| 23 protected: | 24 protected: |
| 24 ~SystemNetworkGetNetworkInterfacesFunction() override; | 25 ~SystemNetworkGetNetworkInterfacesFunction() override; |
| 25 | 26 |
| 26 // AsyncApiFunction: | 27 // AsyncApiFunction: |
| 27 bool RunAsync() override; | 28 bool RunAsync() override; |
| 28 | 29 |
| 29 private: | 30 private: |
| 30 void GetListOnFileThread(); | 31 void GetListOnFileThread(); |
| 31 void HandleGetListError(); | 32 void HandleGetListError(); |
| 32 void SendResponseOnUIThread(const net::NetworkInterfaceList& interface_list); | 33 void SendResponseOnUIThread(const net::NetworkInterfaceList& interface_list); |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 } // namespace api | 36 } // namespace api |
| 36 } // namespace extensions | 37 } // namespace extensions |
| 37 | 38 |
| 38 #endif // EXTENSIONS_BROWSER_API_SYSTEM_NETWORK_SYSTEM_NETWORK_API_H_ | 39 #endif // EXTENSIONS_BROWSER_API_SYSTEM_NETWORK_SYSTEM_NETWORK_API_H_ |
| OLD | NEW |