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

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::MessageLoopProxy>& callback_runner);
Vitaly Buka (NO REVIEWS) 2014/06/21 00:33:39 base::TaskRunner* callback_runner
stevenjb 2014/06/23 17:12:20 Why use TaskRunner here, instead of MesageLoopProx
Vitaly Buka (NO REVIEWS) 2014/06/23 17:46:27 Usually Chrome code use TaskRunner or SequencedTas
Noam Samuel 2014/06/23 17:55:44 used const scoped_refptr<base::TaskRunner>&
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::MessageLoopProxy> callback_runner_;
Vitaly Buka (NO REVIEWS) 2014/06/21 00:33:39 scoped_refptr<base::TaskRunner>
Noam Samuel 2014/06/23 17:55:44 Done.
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