| Index: chrome/browser/extensions/api/networking_private/networking_private_service_client.h
|
| diff --git a/chrome/browser/extensions/api/networking_private/networking_private_service_client.h b/chrome/browser/extensions/api/networking_private/networking_private_service_client.h
|
| index 78a35a29e86e4f212accfc8b347242c62206e19b..5b2dbe59079c6a663f04b78da8236efff3dce4d5 100644
|
| --- a/chrome/browser/extensions/api/networking_private/networking_private_service_client.h
|
| +++ b/chrome/browser/extensions/api/networking_private/networking_private_service_client.h
|
| @@ -11,12 +11,14 @@
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| #include "base/id_map.h"
|
| +#include "base/memory/ref_counted.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/observer_list.h"
|
| #include "base/strings/string16.h"
|
| #include "base/supports_user_data.h"
|
| #include "base/threading/sequenced_worker_pool.h"
|
| #include "base/values.h"
|
| +#include "chrome/browser/extensions/api/networking_private/wifi_passphrase_getter.h"
|
| #include "components/browser_context_keyed_service/browser_context_keyed_service.h"
|
| #include "components/wifi/wifi_service.h"
|
| #include "content/public/browser/browser_thread.h"
|
| @@ -56,6 +58,12 @@ class NetworkingPrivateServiceClient
|
| bool* verified,
|
| std::string* error) = 0;
|
|
|
| + virtual void VerifyAndEncryptCredentials(scoped_ptr<base::ListValue> args,
|
| + std::string* network_guid,
|
| + std::string* base64_encoded_public_key,
|
| + std::string* base64_encoded_ciphertext,
|
| + std::string* error) = 0;
|
| +
|
| virtual void VerifyAndEncryptData(scoped_ptr<base::ListValue> args,
|
| std::string* base64_encoded_ciphertext,
|
| std::string* error) = 0;
|
| @@ -181,6 +189,13 @@ class NetworkingPrivateServiceClient
|
| const CryptoErrorCallback& error_callback);
|
|
|
| // Verify that Chromecast provides valid cryptographically signed properties.
|
| + // If valid, then get WiFi credentials from the system and encrypt them using
|
| + // Chromecast's public key.
|
| + void VerifyAndEncryptCredentials(scoped_ptr<base::ListValue> args,
|
| + const StringResultCallback& callback,
|
| + const CryptoErrorCallback& error_callback);
|
| +
|
| + // Verify that Chromecast provides valid cryptographically signed properties.
|
| // If valid, then encrypt data using Chromecast's public key.
|
| void VerifyAndEncryptData(scoped_ptr<base::ListValue> args,
|
| const StringResultCallback& callback,
|
| @@ -216,8 +231,11 @@ class NetworkingPrivateServiceClient
|
|
|
| BoolResultCallback verify_destination_callback;
|
| StringResultCallback verify_and_encrypt_data_callback;
|
| + StringResultCallback verify_and_encrypt_credentials_callback;
|
| CryptoErrorCallback crypto_error_callback;
|
|
|
| + scoped_ptr<WiFiPassphraseGetter> wifi_passphrase_getter;
|
| +
|
| ServiceCallbacksID id;
|
| };
|
| typedef IDMap<ServiceCallbacks, IDMapOwnPointer> ServiceCallbacksMap;
|
| @@ -243,9 +261,17 @@ class NetworkingPrivateServiceClient
|
| void AfterVerifyDestination(ServiceCallbacksID callback_id,
|
| const bool* result,
|
| const std::string* error);
|
| + void AfterVerifyGetWiFiPassword(ServiceCallbacksID callback_id,
|
| + const std::string* network_guid,
|
| + const std::string* public_key,
|
| + const std::string* encrypted_data,
|
| + const std::string* error);
|
| void AfterVerifyAndEncryptData(ServiceCallbacksID callback_id,
|
| const std::string* result,
|
| const std::string* error);
|
| + void AfterGetAndEncryptCredentials(ServiceCallbacksID callback_id,
|
| + const std::string& encrypted_data,
|
| + const std::string& error);
|
|
|
| void OnNetworksChangedEventOnUIThread(
|
| const WiFiService::NetworkGuidList& network_guid_list);
|
|
|