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

Unified Diff: chrome/browser/extensions/api/networking_private/networking_private_credentials_getter.h

Issue 102993002: Implement Networking Private API VerifyAndEncryptCredentials method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address codereview comments. Created 6 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 side-by-side diff with in-line comments
Download patch
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..d94a2faa4c10545c7cdb89cca07626e5b31edbae
--- /dev/null
+++ b/chrome/browser/extensions/api/networking_private/networking_private_credentials_getter.h
@@ -0,0 +1,43 @@
+// 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 "chrome/browser/extensions/api/networking_private/networking_private_service_client.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:
+ static NetworkingPrivateCredentialsGetter* Create();
+
+ NetworkingPrivateCredentialsGetter() {}
+
+ virtual ~NetworkingPrivateCredentialsGetter() {}
+
+ // Starts getting credentials. Calls |callback| on random thread with
tbarzic 2014/02/25 23:07:25 I'd reword this to something like: // Starts gett
mef 2014/02/26 17:43:36 Done.
+ // |key_data| or |error|. Note that |this| may be deleted prior to call to
+ // |callback|.
+ virtual void Start(
+ const std::string& network_guid,
+ const std::string& public_key,
+ const extensions::NetworkingPrivateServiceClient::CryptoVerify::
+ VerifyAndEncryptCredentialsCallback& callback) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCredentialsGetter);
+};
+
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_CREDENTIALS_GETTER_H_

Powered by Google App Engine
This is Rietveld 408576698