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

Side by Side Diff: chrome/browser/local_discovery/wifi/credential_getter_win.h

Issue 343053002: Credential passing for WifiManager in Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 unified diff | Download patch
OLDNEW
(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_LOCAL_DISCOVERY_WIFI_CREDENTIAL_GETTER_WIN_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_CREDENTIAL_GETTER_WIN_H_
7
8 #include "base/message_loop/message_loop_proxy.h"
9 #include "content/public/browser/utility_process_host.h"
10 #include "content/public/browser/utility_process_host_client.h"
11
12 namespace local_discovery {
13 namespace wifi {
14
15 class CredentialGetterWin : public content::UtilityProcessHostClient {
16 public:
17 typedef base::Callback<void(bool success, const std::string& key)>
18 CredentialsCallback;
19
20 CredentialGetterWin();
21 virtual ~CredentialGetterWin();
22
23 void StartGetCredentials(const std::string& network_guid,
24 const CredentialsCallback& callback);
25
26 // Used in cases where base::MessageLoopProxy::current() does not exist.
27 void SetCallbackRunner(
28 const scoped_refptr<base::TaskRunner>& callback_runner);
29
30 private:
31 // UtilityProcessHostClient
32 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
33 virtual void OnProcessCrashed(int exit_code) OVERRIDE;
34 virtual void OnProcessLaunchFailed() OVERRIDE;
35
36 // IPC message handlers.
37 void OnGotCredentials(const std::string& key_data, bool success);
38
39 void StartOnIOThread(const std::string& network_guid);
40
41 void PostCallback(bool success, const std::string& key_data);
42
43 CredentialsCallback callback_;
44 scoped_refptr<base::TaskRunner> callback_runner_;
45 };
46
47 } // namespace wifi
48 } // namespace local_discovery
49
50 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_CREDENTIAL_GETTER_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698