Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Unified Diff: chrome/browser/extensions/api/networking_private/networking_private_api.h

Issue 870163002: Move networking_private to src/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GN 2 Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/networking_private/networking_private_api.h
diff --git a/chrome/browser/extensions/api/networking_private/networking_private_api.h b/chrome/browser/extensions/api/networking_private/networking_private_api.h
deleted file mode 100644
index a78c76716089d9aeb2f01e5634a870eedacbe0a8..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/api/networking_private/networking_private_api.h
+++ /dev/null
@@ -1,410 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_H_
-#define CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_H_
-
-#include <string>
-
-#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/values.h"
-#include "extensions/browser/extension_function.h"
-
-namespace extensions {
-
-namespace networking_private {
-
-extern const char kErrorInvalidNetworkGuid[];
-extern const char kErrorNetworkUnavailable[];
-extern const char kErrorEncryptionError[];
-extern const char kErrorNotReady[];
-extern const char kErrorNotSupported[];
-
-} // namespace networking_private
-
-// Implements the chrome.networkingPrivate.getProperties method.
-class NetworkingPrivateGetPropertiesFunction : public AsyncExtensionFunction {
- public:
- NetworkingPrivateGetPropertiesFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.getProperties",
- NETWORKINGPRIVATE_GETPROPERTIES);
-
- protected:
- ~NetworkingPrivateGetPropertiesFunction() override;
-
- // AsyncExtensionFunction overrides.
- bool RunAsync() override;
-
- private:
- void Success(scoped_ptr<base::DictionaryValue> result);
- void Failure(const std::string& error_name);
-
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetPropertiesFunction);
-};
-
-// Implements the chrome.networkingPrivate.getManagedProperties method.
-class NetworkingPrivateGetManagedPropertiesFunction
- : public AsyncExtensionFunction {
- public:
- NetworkingPrivateGetManagedPropertiesFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.getManagedProperties",
- NETWORKINGPRIVATE_GETMANAGEDPROPERTIES);
-
- protected:
- ~NetworkingPrivateGetManagedPropertiesFunction() override;
-
- // AsyncExtensionFunction overrides.
- bool RunAsync() override;
-
- private:
- void Success(scoped_ptr<base::DictionaryValue> result);
- void Failure(const std::string& error);
-
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetManagedPropertiesFunction);
-};
-
-// Implements the chrome.networkingPrivate.getState method.
-class NetworkingPrivateGetStateFunction : public AsyncExtensionFunction {
- public:
- NetworkingPrivateGetStateFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.getState",
- NETWORKINGPRIVATE_GETSTATE);
-
- protected:
- ~NetworkingPrivateGetStateFunction() override;
-
- // AsyncExtensionFunction overrides.
- bool RunAsync() override;
-
- private:
- void Success(scoped_ptr<base::DictionaryValue> result);
- void Failure(const std::string& error);
-
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetStateFunction);
-};
-
-// Implements the chrome.networkingPrivate.setProperties method.
-class NetworkingPrivateSetPropertiesFunction : public AsyncExtensionFunction {
- public:
- NetworkingPrivateSetPropertiesFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.setProperties",
- NETWORKINGPRIVATE_SETPROPERTIES);
-
- protected:
- ~NetworkingPrivateSetPropertiesFunction() override;
-
- // AsyncExtensionFunction overrides.
- bool RunAsync() override;
-
- private:
- void Success();
- void Failure(const std::string& error);
-
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateSetPropertiesFunction);
-};
-
-// Implements the chrome.networkingPrivate.createNetwork method.
-class NetworkingPrivateCreateNetworkFunction : public AsyncExtensionFunction {
- public:
- NetworkingPrivateCreateNetworkFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.createNetwork",
- NETWORKINGPRIVATE_CREATENETWORK);
-
- protected:
- ~NetworkingPrivateCreateNetworkFunction() override;
-
- // AsyncExtensionFunction overrides.
- bool RunAsync() override;
-
- private:
- void Success(const std::string& guid);
- void Failure(const std::string& error);
-
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCreateNetworkFunction);
-};
-
-// Implements the chrome.networkingPrivate.getNetworks method.
-class NetworkingPrivateGetNetworksFunction : public AsyncExtensionFunction {
- public:
- NetworkingPrivateGetNetworksFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.getNetworks",
- NETWORKINGPRIVATE_GETNETWORKS);
-
- protected:
- ~NetworkingPrivateGetNetworksFunction() override;
-
- // AsyncExtensionFunction overrides.
- bool RunAsync() override;
-
- private:
- void Success(scoped_ptr<base::ListValue> network_list);
- void Failure(const std::string& error);
-
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetNetworksFunction);
-};
-
-// Implements the chrome.networkingPrivate.getVisibleNetworks method.
-class NetworkingPrivateGetVisibleNetworksFunction
- : public AsyncExtensionFunction {
- public:
- NetworkingPrivateGetVisibleNetworksFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.getVisibleNetworks",
- NETWORKINGPRIVATE_GETVISIBLENETWORKS);
-
- protected:
- ~NetworkingPrivateGetVisibleNetworksFunction() override;
-
- // AsyncExtensionFunction overrides.
- bool RunAsync() override;
-
- private:
- void Success(scoped_ptr<base::ListValue> network_list);
- void Failure(const std::string& error);
-
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetVisibleNetworksFunction);
-};
-
-// Implements the chrome.networkingPrivate.getEnabledNetworkTypes method.
-class NetworkingPrivateGetEnabledNetworkTypesFunction
- : public SyncExtensionFunction {
- public:
- NetworkingPrivateGetEnabledNetworkTypesFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.getEnabledNetworkTypes",
- NETWORKINGPRIVATE_GETENABLEDNETWORKTYPES);
-
- protected:
- ~NetworkingPrivateGetEnabledNetworkTypesFunction() override;
-
- // SyncExtensionFunction overrides.
- bool RunSync() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetEnabledNetworkTypesFunction);
-};
-
-// Implements the chrome.networkingPrivate.enableNetworkType method.
-class NetworkingPrivateEnableNetworkTypeFunction
- : public SyncExtensionFunction {
- public:
- NetworkingPrivateEnableNetworkTypeFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.enableNetworkType",
- NETWORKINGPRIVATE_ENABLENETWORKTYPE);
-
- protected:
- ~NetworkingPrivateEnableNetworkTypeFunction() override;
-
- // SyncExtensionFunction overrides.
- bool RunSync() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateEnableNetworkTypeFunction);
-};
-
-// Implements the chrome.networkingPrivate.disableNetworkType method.
-class NetworkingPrivateDisableNetworkTypeFunction
- : public SyncExtensionFunction {
- public:
- NetworkingPrivateDisableNetworkTypeFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.disableNetworkType",
- NETWORKINGPRIVATE_DISABLENETWORKTYPE);
-
- protected:
- ~NetworkingPrivateDisableNetworkTypeFunction() override;
-
- // SyncExtensionFunction overrides.
- bool RunSync() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateDisableNetworkTypeFunction);
-};
-
-// Implements the chrome.networkingPrivate.requestNetworkScan method.
-class NetworkingPrivateRequestNetworkScanFunction
- : public SyncExtensionFunction {
- public:
- NetworkingPrivateRequestNetworkScanFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.requestNetworkScan",
- NETWORKINGPRIVATE_REQUESTNETWORKSCAN);
-
- protected:
- ~NetworkingPrivateRequestNetworkScanFunction() override;
-
- // SyncExtensionFunction overrides.
- bool RunSync() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateRequestNetworkScanFunction);
-};
-
-
-// Implements the chrome.networkingPrivate.startConnect method.
-class NetworkingPrivateStartConnectFunction : public AsyncExtensionFunction {
- public:
- NetworkingPrivateStartConnectFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.startConnect",
- NETWORKINGPRIVATE_STARTCONNECT);
-
- protected:
- ~NetworkingPrivateStartConnectFunction() override;
-
- // AsyncExtensionFunction overrides.
- bool RunAsync() override;
-
- private:
- void Success();
- void Failure(const std::string& error);
-
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateStartConnectFunction);
-};
-
-// Implements the chrome.networkingPrivate.startDisconnect method.
-class NetworkingPrivateStartDisconnectFunction : public AsyncExtensionFunction {
- public:
- NetworkingPrivateStartDisconnectFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.startDisconnect",
- NETWORKINGPRIVATE_STARTDISCONNECT);
-
- protected:
- ~NetworkingPrivateStartDisconnectFunction() override;
-
- // AsyncExtensionFunction overrides.
- bool RunAsync() override;
-
- private:
- void Success();
- void Failure(const std::string& error);
-
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateStartDisconnectFunction);
-};
-
-// Implements the chrome.networkingPrivate.verifyDestination method.
-class NetworkingPrivateVerifyDestinationFunction
- : public AsyncExtensionFunction {
- public:
- NetworkingPrivateVerifyDestinationFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.verifyDestination",
- NETWORKINGPRIVATE_VERIFYDESTINATION);
-
- protected:
- ~NetworkingPrivateVerifyDestinationFunction() override;
-
- // AsyncExtensionFunction overrides.
- bool RunAsync() override;
-
- void Success(bool result);
- void Failure(const std::string& error);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateVerifyDestinationFunction);
-};
-
-// Implements the chrome.networkingPrivate.verifyAndEncryptCredentials method.
-class NetworkingPrivateVerifyAndEncryptCredentialsFunction
- : public AsyncExtensionFunction {
- public:
- NetworkingPrivateVerifyAndEncryptCredentialsFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.verifyAndEncryptCredentials",
- NETWORKINGPRIVATE_VERIFYANDENCRYPTCREDENTIALS);
-
- protected:
- ~NetworkingPrivateVerifyAndEncryptCredentialsFunction() override;
-
- // AsyncExtensionFunction overrides.
- bool RunAsync() override;
-
- void Success(const std::string& result);
- void Failure(const std::string& error);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(
- NetworkingPrivateVerifyAndEncryptCredentialsFunction);
-};
-
-// Implements the chrome.networkingPrivate.verifyAndEncryptData method.
-class NetworkingPrivateVerifyAndEncryptDataFunction
- : public AsyncExtensionFunction {
- public:
- NetworkingPrivateVerifyAndEncryptDataFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.verifyAndEncryptData",
- NETWORKINGPRIVATE_VERIFYANDENCRYPTDATA);
-
- protected:
- ~NetworkingPrivateVerifyAndEncryptDataFunction() override;
-
- // AsyncExtensionFunction overrides.
- bool RunAsync() override;
-
- void Success(const std::string& result);
- void Failure(const std::string& error);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateVerifyAndEncryptDataFunction);
-};
-
-// Implements the chrome.networkingPrivate.setWifiTDLSEnabledState method.
-class NetworkingPrivateSetWifiTDLSEnabledStateFunction
- : public AsyncExtensionFunction {
- public:
- NetworkingPrivateSetWifiTDLSEnabledStateFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.setWifiTDLSEnabledState",
- NETWORKINGPRIVATE_SETWIFITDLSENABLEDSTATE);
-
- protected:
- ~NetworkingPrivateSetWifiTDLSEnabledStateFunction() override;
-
- // AsyncExtensionFunction overrides.
- bool RunAsync() override;
-
- void Success(const std::string& result);
- void Failure(const std::string& error);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateSetWifiTDLSEnabledStateFunction);
-};
-
-// Implements the chrome.networkingPrivate.getWifiTDLSStatus method.
-class NetworkingPrivateGetWifiTDLSStatusFunction
- : public AsyncExtensionFunction {
- public:
- NetworkingPrivateGetWifiTDLSStatusFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.getWifiTDLSStatus",
- NETWORKINGPRIVATE_GETWIFITDLSSTATUS);
-
- protected:
- ~NetworkingPrivateGetWifiTDLSStatusFunction() override;
-
- // AsyncExtensionFunction overrides.
- bool RunAsync() override;
-
- void Success(const std::string& result);
- void Failure(const std::string& error);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetWifiTDLSStatusFunction);
-};
-
-class NetworkingPrivateGetCaptivePortalStatusFunction
- : public AsyncExtensionFunction {
- public:
- NetworkingPrivateGetCaptivePortalStatusFunction() {}
- DECLARE_EXTENSION_FUNCTION("networkingPrivate.getCaptivePortalStatus",
- NETWORKINGPRIVATE_GETCAPTIVEPORTALSTATUS);
-
- // AsyncExtensionFunction overrides.
- bool RunAsync() override;
-
- protected:
- ~NetworkingPrivateGetCaptivePortalStatusFunction() override;
-
- private:
- void Success(const std::string& result);
- void Failure(const std::string& error);
-
- DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetCaptivePortalStatusFunction);
-};
-
-} // namespace extensions
-
-#endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_API_H_

Powered by Google App Engine
This is Rietveld 408576698