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

Unified Diff: chrome/browser/chromeos/extensions/networking_private_api.h

Issue 12541007: This adds the setProperties and getState functions to the networking API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed flag usage Created 7 years, 9 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/chromeos/extensions/networking_private_api.h
diff --git a/chrome/browser/chromeos/extensions/networking_private_api.h b/chrome/browser/chromeos/extensions/networking_private_api.h
index b1675720c4e708f0161eaa9efa77f5726d3591a1..9da50dd9253ef3c70f088a5c659ead97d96bdc2f 100644
--- a/chrome/browser/chromeos/extensions/networking_private_api.h
+++ b/chrome/browser/chromeos/extensions/networking_private_api.h
@@ -30,7 +30,6 @@ class NetworkingPrivateGetPropertiesFunction : public AsyncExtensionFunction {
virtual bool RunImpl() OVERRIDE;
private:
- // Callbacks if talking to ManagedNetworkConfigurationHandler.
void GetPropertiesSuccess(const std::string& service_path,
const base::DictionaryValue& result);
void GetPropertiesFailed(const std::string& error_name,
@@ -38,13 +37,50 @@ class NetworkingPrivateGetPropertiesFunction : public AsyncExtensionFunction {
DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetPropertiesFunction);
};
+// Implements the chrome.networkingPrivate.getProperties method.
+class NetworkingPrivateGetStateFunction : public AsyncExtensionFunction {
stevenjb 2013/03/07 00:43:22 NetworkingPrivateGetPropertiesFunction?
Greg Spencer (Chromium) 2013/03/07 22:01:23 No, the comment is wrong. Fixed.
+ public:
+ NetworkingPrivateGetStateFunction() {}
+ DECLARE_EXTENSION_FUNCTION("networkingPrivate.getState",
+ NETWORKINGPRIVATE_GETSTATE);
+
+ protected:
+ virtual ~NetworkingPrivateGetStateFunction();
+
+ // AsyncExtensionFunction overrides.
+ virtual bool RunImpl() OVERRIDE;
+
+ private:
+ 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:
+ virtual ~NetworkingPrivateSetPropertiesFunction();
+
+ // AsyncExtensionFunction overrides.
+ virtual bool RunImpl() OVERRIDE;
+
+ private:
+ void ErrorCallback(const std::string& error_name,
+ const scoped_ptr<base::DictionaryValue> error_data);
+ void ResultCallback();
+ DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateSetPropertiesFunction);
+};
+
// Implements the chrome.networkingPrivate.getVisibleNetworks method.
class NetworkingPrivateGetVisibleNetworksFunction
: public SyncExtensionFunction {
public:
NetworkingPrivateGetVisibleNetworksFunction() {}
DECLARE_EXTENSION_FUNCTION("networkingPrivate.getVisibleNetworks",
- NETWORKINGPRIVATE_GETVISIBLENETWORKS);
+ NETWORKINGPRIVATE_GETVISIBLENETWORKS);
protected:
virtual ~NetworkingPrivateGetVisibleNetworksFunction();

Powered by Google App Engine
This is Rietveld 408576698