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

Side by Side Diff: chrome/browser/chromeos/extensions/networking_private_api.h

Issue 12211103: Adding a new ManagedNetworkConfigurationHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Greg's comments. Created 7 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // These classes implement the chrome.networkingPrivate JavaScript extension 5 // These classes implement the chrome.networkingPrivate JavaScript extension
6 // API. 6 // API.
7 7
8 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_NETWORKING_PRIVATE_API_H_ 8 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_NETWORKING_PRIVATE_API_H_
9 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_NETWORKING_PRIVATE_API_H_ 9 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_NETWORKING_PRIVATE_API_H_
10 10
(...skipping 12 matching lines...) Expand all
23 DECLARE_EXTENSION_FUNCTION("networkingPrivate.getProperties", 23 DECLARE_EXTENSION_FUNCTION("networkingPrivate.getProperties",
24 NETWORKINGPRIVATE_GETPROPERTIES); 24 NETWORKINGPRIVATE_GETPROPERTIES);
25 25
26 protected: 26 protected:
27 virtual ~NetworkingPrivateGetPropertiesFunction(); 27 virtual ~NetworkingPrivateGetPropertiesFunction();
28 28
29 // AsyncExtensionFunction overrides. 29 // AsyncExtensionFunction overrides.
30 virtual bool RunImpl() OVERRIDE; 30 virtual bool RunImpl() OVERRIDE;
31 31
32 private: 32 private:
33 void ResultCallback(chromeos::DBusMethodCallStatus call_status, 33 // Callback if talking to ShillServiceClient directly.
34 // TODO(pneubeck): Remove once the ManagedNetworkConfigurationHandler is
35 // stable.
36 void ResultCallback(const std::string& service_path,
37 chromeos::DBusMethodCallStatus call_status,
34 const base::DictionaryValue& result); 38 const base::DictionaryValue& result);
39
40 // Callbacks if talking to ManagedNetworkConfigurationHandler.
41 void GetPropertiesSuccess(const std::string& service_path,
42 const base::DictionaryValue& result);
43 void GetPropertiesFailed(const std::string& error_name,
44 scoped_ptr<base::DictionaryValue> error_data);
35 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetPropertiesFunction); 45 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetPropertiesFunction);
36 }; 46 };
37 47
38 // Implements the chrome.networkingPrivate.getVisibleNetworks method. 48 // Implements the chrome.networkingPrivate.getVisibleNetworks method.
39 class NetworkingPrivateGetVisibleNetworksFunction 49 class NetworkingPrivateGetVisibleNetworksFunction
40 : public AsyncExtensionFunction { 50 : public AsyncExtensionFunction {
41 public: 51 public:
42 NetworkingPrivateGetVisibleNetworksFunction() {} 52 NetworkingPrivateGetVisibleNetworksFunction() {}
43 DECLARE_EXTENSION_FUNCTION("networkingPrivate.getVisibleNetworks", 53 DECLARE_EXTENSION_FUNCTION("networkingPrivate.getVisibleNetworks",
44 NETWORKINGPRIVATE_GETVISIBLENETWORKS); 54 NETWORKINGPRIVATE_GETVISIBLENETWORKS);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 virtual bool RunImpl() OVERRIDE; 174 virtual bool RunImpl() OVERRIDE;
165 175
166 void ResultCallback(const std::string& result); 176 void ResultCallback(const std::string& result);
167 void ErrorCallback(const std::string& error_name, const std::string& error); 177 void ErrorCallback(const std::string& error_name, const std::string& error);
168 178
169 private: 179 private:
170 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateVerifyAndSignDataFunction); 180 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateVerifyAndSignDataFunction);
171 }; 181 };
172 182
173 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_NETWORKING_PRIVATE_API_H_ 183 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_NETWORKING_PRIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698