OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_WIFI_PASSPHRASE_GETTER_
H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_WIFI_PASSPHRASE_GETTER_
H_ |
| 7 |
| 8 #include <string> |
| 9 #include <vector> |
| 10 |
| 11 #include "base/basictypes.h" |
| 12 #include "content/public/browser/browser_thread.h" |
| 13 #include "content/public/browser/utility_process_host_client.h" |
| 14 |
| 15 namespace extensions { |
| 16 |
| 17 // WiFiPassphraseGetter gets plain-text WiFi passphrase from the system |
| 18 // (requires UAC privilege elevation) and encrypts it with public key. |
| 19 class WiFiPassphraseGetter { |
| 20 public: |
| 21 typedef base::Callback<void(const std::string& passphrase, |
| 22 const std::string& error)> PassphraseCallback; |
| 23 |
| 24 static WiFiPassphraseGetter* Create(const PassphraseCallback& callback, |
| 25 int32 callback_id, |
| 26 const std::string& network_guid, |
| 27 const std::string& public_key); |
| 28 |
| 29 // Start getting passphrase. |
| 30 virtual void Start() = 0; |
| 31 |
| 32 WiFiPassphraseGetter() {} |
| 33 |
| 34 virtual ~WiFiPassphraseGetter() {} |
| 35 |
| 36 private: |
| 37 DISALLOW_COPY_AND_ASSIGN(WiFiPassphraseGetter); |
| 38 }; |
| 39 |
| 40 } // namespace extensions |
| 41 |
| 42 #endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_WIFI_PASSPHRASE_GETT
ER_H_ |
OLD | NEW |