| Index: chrome/browser/extensions/api/networking_private/networking_private_credentials_getter.h
|
| diff --git a/chrome/browser/extensions/api/networking_private/networking_private_credentials_getter.h b/chrome/browser/extensions/api/networking_private/networking_private_credentials_getter.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f52bb7c5d33dcfc0b59dcfdd50352d1372577d43
|
| --- /dev/null
|
| +++ b/chrome/browser/extensions/api/networking_private/networking_private_credentials_getter.h
|
| @@ -0,0 +1,46 @@
|
| +// Copyright 2014 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_CREDENTIALS_GETTER_H_
|
| +#define CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_CREDENTIALS_GETTER_H_
|
| +
|
| +#include <string>
|
| +#include <vector>
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "content/public/browser/browser_thread.h"
|
| +#include "content/public/browser/utility_process_host_client.h"
|
| +
|
| +namespace extensions {
|
| +
|
| +// NetworkingPrivateCredentialsGetter gets plain-text WiFi credentials from the
|
| +// system and encrypts it with public key.
|
| +class NetworkingPrivateCredentialsGetter {
|
| + public:
|
| + typedef base::Callback<void(const std::string& key_data,
|
| + const std::string& error)> GetCredentialsCallback;
|
| +
|
| + static NetworkingPrivateCredentialsGetter* Create(
|
| + const GetCredentialsCallback& callback);
|
| +
|
| + // Start getting credentials.
|
| + virtual void Start(const std::string& network_guid,
|
| + const std::string& public_key) = 0;
|
| +
|
| + // Post callback with |key_data| and |error| on UI thread.
|
| + // Called on any thread.
|
| + virtual void ReportResult(const std::string& key_data,
|
| + const std::string& error) = 0;
|
| +
|
| + NetworkingPrivateCredentialsGetter() {}
|
| +
|
| + virtual ~NetworkingPrivateCredentialsGetter() {}
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCredentialsGetter);
|
| +};
|
| +
|
| +} // namespace extensions
|
| +
|
| +#endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_CREDENTIALS_GETTER_H_
|
|
|