Chromium Code Reviews| Index: extensions/browser/api/networking_private/networking_private_delegate.h |
| diff --git a/extensions/browser/api/networking_private/networking_private_delegate.h b/extensions/browser/api/networking_private/networking_private_delegate.h |
| index bf75283be79bf664fec889d103c218c1f9c6318f..8a79351d947df8fdf6d544f21d5218f3b4b73ebf 100644 |
| --- a/extensions/browser/api/networking_private/networking_private_delegate.h |
| +++ b/extensions/browser/api/networking_private/networking_private_delegate.h |
| @@ -6,11 +6,14 @@ |
| #define EXTENSIONS_BROWSER_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_DELEGATE_H_ |
| #include <string> |
| +#include <vector> |
| #include "base/callback.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "base/memory/scoped_vector.h" |
| #include "base/values.h" |
| #include "components/keyed_service/core/keyed_service.h" |
| +#include "extensions/common/api/networking_private.h" |
|
pneubeck (no reviews)
2015/04/09 09:41:22
not sure why you have to change this include.
if p
stevenjb
2015/04/09 16:20:25
Because we use ScopedVector<DeviceStateProperties>
|
| namespace content { |
| class BrowserContext; |
| @@ -22,6 +25,7 @@ class NetworkingPrivateDelegateObserver; |
| namespace core_api { |
| namespace networking_private { |
| +struct DeviceStateProperties; |
| struct VerificationProperties; |
| } // networking_private |
| } // core_api |
| @@ -31,15 +35,17 @@ struct VerificationProperties; |
| // networking_private.idl for descriptions of the expected inputs and results. |
| class NetworkingPrivateDelegate : public KeyedService { |
| public: |
| - typedef base::Callback<void(scoped_ptr<base::DictionaryValue>)> |
| - DictionaryCallback; |
| - typedef base::Callback<void()> VoidCallback; |
| - typedef base::Callback<void(bool)> BoolCallback; |
| - typedef base::Callback<void(const std::string&)> StringCallback; |
| - typedef base::Callback<void(scoped_ptr<base::ListValue>)> NetworkListCallback; |
| - typedef base::Callback<void(const std::string&)> FailureCallback; |
| - typedef core_api::networking_private::VerificationProperties |
| - VerificationProperties; |
| + using DictionaryCallback = |
| + base::Callback<void(scoped_ptr<base::DictionaryValue>)>; |
| + using VoidCallback = base::Callback<void()>; |
| + using BoolCallback = base::Callback<void(bool)>; |
| + using StringCallback = base::Callback<void(const std::string&)>; |
| + using NetworkListCallback = base::Callback<void(scoped_ptr<base::ListValue>)>; |
| + using FailureCallback = base::Callback<void(const std::string&)>; |
| + using DeviceStateList = |
| + ScopedVector<core_api::networking_private::DeviceStateProperties>; |
| + using VerificationProperties = |
| + core_api::networking_private::VerificationProperties; |
| // The Verify* methods will be forwarded to a delegate implementation if |
| // provided, otherwise they will fail. A separate delegate it used so that the |
| @@ -136,6 +142,9 @@ class NetworkingPrivateDelegate : public KeyedService { |
| // Returns a list of ONC type strings. |
| virtual scoped_ptr<base::ListValue> GetEnabledNetworkTypes() = 0; |
| + // Returns a list of DeviceStateProperties. |
| + virtual scoped_ptr<DeviceStateList> GetDeviceStateList() = 0; |
| + |
| // Returns true if the ONC network type |type| is enabled. |
| virtual bool EnableNetworkType(const std::string& type) = 0; |