| 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_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_H_ |
| 6 #define EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_H_ | 6 #define EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // AsyncExtensionFunction overrides. | 118 // AsyncExtensionFunction overrides. |
| 119 bool RunAsync() override; | 119 bool RunAsync() override; |
| 120 | 120 |
| 121 private: | 121 private: |
| 122 void Success(const std::string& guid); | 122 void Success(const std::string& guid); |
| 123 void Failure(const std::string& error); | 123 void Failure(const std::string& error); |
| 124 | 124 |
| 125 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCreateNetworkFunction); | 125 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCreateNetworkFunction); |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 // Implements the chrome.networkingPrivate.createNetwork method. |
| 129 class NetworkingPrivateForgetNetworkFunction : public AsyncExtensionFunction { |
| 130 public: |
| 131 NetworkingPrivateForgetNetworkFunction() {} |
| 132 DECLARE_EXTENSION_FUNCTION("networkingPrivate.forgetNetwork", |
| 133 NETWORKINGPRIVATE_FORGETNETWORK); |
| 134 |
| 135 protected: |
| 136 ~NetworkingPrivateForgetNetworkFunction() override; |
| 137 |
| 138 // AsyncExtensionFunction overrides. |
| 139 bool RunAsync() override; |
| 140 |
| 141 private: |
| 142 void Success(); |
| 143 void Failure(const std::string& error); |
| 144 |
| 145 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateForgetNetworkFunction); |
| 146 }; |
| 147 |
| 128 // Implements the chrome.networkingPrivate.getNetworks method. | 148 // Implements the chrome.networkingPrivate.getNetworks method. |
| 129 class NetworkingPrivateGetNetworksFunction : public AsyncExtensionFunction { | 149 class NetworkingPrivateGetNetworksFunction : public AsyncExtensionFunction { |
| 130 public: | 150 public: |
| 131 NetworkingPrivateGetNetworksFunction() {} | 151 NetworkingPrivateGetNetworksFunction() {} |
| 132 DECLARE_EXTENSION_FUNCTION("networkingPrivate.getNetworks", | 152 DECLARE_EXTENSION_FUNCTION("networkingPrivate.getNetworks", |
| 133 NETWORKINGPRIVATE_GETNETWORKS); | 153 NETWORKINGPRIVATE_GETNETWORKS); |
| 134 | 154 |
| 135 protected: | 155 protected: |
| 136 ~NetworkingPrivateGetNetworksFunction() override; | 156 ~NetworkingPrivateGetNetworksFunction() override; |
| 137 | 157 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 private: | 440 private: |
| 421 void Success(const std::string& result); | 441 void Success(const std::string& result); |
| 422 void Failure(const std::string& error); | 442 void Failure(const std::string& error); |
| 423 | 443 |
| 424 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetCaptivePortalStatusFunction); | 444 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetCaptivePortalStatusFunction); |
| 425 }; | 445 }; |
| 426 | 446 |
| 427 } // namespace extensions | 447 } // namespace extensions |
| 428 | 448 |
| 429 #endif // EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_H_ | 449 #endif // EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_H_ |
| OLD | NEW |